Load Balancing Algorithms - Dynamic Load Balancing


In this article we will be looking onto Dynamic Algorithms used in Load Balancing.
Dynamic algorithms:
Depends on external feedback for distribution of load.
1) Least Connections:
Constantly monitors existing server connections and distributes incoming requests based on the server with the fewest connections.
Highly effective when your application has many connections with a variable connection time.
Algorithm uses the connection count maintained by the load balancer to ensure equal and efficient distribution of requests to servers.
fault-tolerant because it can redirect traffic based on the server's response to active connections.
Doesn't support session affinity and persistence unless combined with a session persistence method, like prioritizing requests from a specific session to a particular server.
2) Least Response Time:
Tracks the server response times to fulfill requests.
Algorithm aims to reduce the load distributed to the servers with high response times and concentrate the load on the servers with low response times.
Difficult to use the least response time algorithm when dealing with a global distribution of loads because it becomes increasingly difficult to accurately measure and compare responses across geographies, especially where distances are larger.
UseCase: real-time applications, such as online gaming, video streaming and high-frequency trading platforms.
3) Resource Based:
Takes into account the real-time resource usage metrics from various servers in the pool.
Need agents installed on the servers or other monitoring tools that connect to the servers and send you CPU and memory utilization data frequently.
Usage metrics represent CPU usage, memory usage or a combination of both.
This algorithm is often more resource-intensive than the other dynamic algorithms because of the added load that comes with tracking utilization metrics continuously.
By default, the resource-based algorithm doesn't allow you to maintain session affinity and persistence, but you can integrate it with session persistence methodologies to do so. Some of those session persistence methodologies are custom HTTP headers, SSL session IDs and session-based cookies.
UseCases: High Performance Computing Environments
Subscribe to my newsletter
Read articles from Gaurav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
