Load Balancing Algorithms

What Is Load Balancing ?
Load balancing is a technique to efficiently distribute the incoming traffic (User Requests) across multiple servers. it helps to improve the capacity and realiability of an application by routing the client request to an appropriate server to avoid burden on a single server. 

Load Balancing Algorithms:
There are numerous techniques and algorithms that can be used to intelligently load balance client access requests across server pools. The technique chosen will depend on the type of service or application being served.

1. Round Robin: A batch of servers are programmed to handle load in a rotating sequential manner. The algorithm assumes that each device is able to process the same number of requests. New incoming request is sent to a server from the server list in a rotating manner.

2. Weighted Round Robbin:
Weighted Round Robin builds on the simple Round Robin load balancing method. In the weighted version, each server in the pool is given a static numerical weighting. Servers with higher ratings get more requests sent to them.

3. Least Connection: In this algorithm the client request is sent to the server having minimum number of active connections. Load balancer keep track of number active connection on each server and send the new client request to a server having least active connection.

4. Weighted Least Connection: In this algorithm the load balancer assign a numerical weighting to each server based on their capacity of handling load. If two server has same number of active connections, then the server with the higher weighting will be allocated the new request.

5. Source IP Hash: This algorithm combines source and destination IP addresses of the client and server to generate a unique hash key. The key is used to allocate the client to a particular server. As the key can be regenerated if the session is broken, the client request is directed to the same server it was using previously. This is useful if it’s important that a client should connect to a session that is still active after a disconnection. For example, to retain items in a shopping cart between sessions.

No comments

Powered by Blogger.