What are some Load Balancing Algorithms you know?

Technology CommunityCategory: Load BalancingWhat are some Load Balancing Algorithms you know?
VietMX Staff asked 3 years ago

There is a variety of load balancing methods, which use different algorithms best suited for a particular situation.

  • Least Connection Method: directs traffic to the server with the fewest active connections. Most useful when there are a large number of persistent connections in the traffic unevenly distributed between the servers.
  • Least Response Time Method: directs traffic to the server with the fewest active connections, the fewest send requests and the lowest average response time.
  • Round Robin Method: rotates servers by directing traffic to the first available server and then moves that server to the bottom of the queue. Most useful when servers are of equal specification, in a single geographic location and there are not many persistent connections.
  • IP Hash: the IP address of the client determines which server receives the request.
  • The “Power of Two Choices” – The algorithm decides which server will respond to each request by picking two random servers from the fleet and choosing the one with the fewest active connections. The whole purpose is to save the load balancer from the cost of having to check all servers, while still making a better choice than a purely random decision. By randomly picking a small number of entries among a list and then selecting the least loaded one, the probability of choosing an overloaded server decreases. This is especially true as the number of servers in the fleet grows and the distribution of selected servers widens. The system balances itself: The wider the distribution, the fairer the outcome.