Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Algorithms behind load-balancers?

I need to study about load-balancers, such as Network Load Balancing, Linux Virtual Server, HAProxy, etc. There're something under-the-hood I need to know:

  • What algorithms/technologies are used in these load-balancers? Which is the most popular? most effective?

I expect that these algorithms/technologies will not be too complicated. Are there some resources written about them?

like image 817
Quan Mai Avatar asked Feb 27 '23 06:02

Quan Mai


2 Answers

Load balancing in Apache, for example, is taken care of by the module called mod_proxy_balancer. This module supports 3 load balancing algorithms:

  • Request counting
  • Weighted traffic counting
  • Pending request counting

For more details, take a look here: mod_proxy_balancer

like image 119
Eric Eijkelenboom Avatar answered Mar 03 '23 21:03

Eric Eijkelenboom


Not sure if this belongs on serverfault or not, but some load balancing techniques are:

  • Round Robin
  • Least Connections

I used least connections. It just made the most sense to send the person to the machine which had the least amount of load.

like image 32
Jack Marchetti Avatar answered Mar 03 '23 21:03

Jack Marchetti