Tuesday, April 7, 2015

What are different Load-Balancing methods

The following are some of the popular load balancing methods used.

1. Least Connections

Sends the request to the real server that currently has the fewest active connections with clients. For sites where a number of servers have similar performance, the least connections option smooths distribution if a server gets bogged down. For sites where the capacity of various servers varies greatly, the least connections option maintains an equal number of connections among all servers. This results in those servers capable of processing and terminating connections faster receiving more connections than slower servers over time.

2. Round Robin

Directs the service request to the next server, and treats all servers equally regardless of the number of connections or response time. For example, in a configuration of four servers, the first request is sent to server1, the second request is sent to server2, the third is sent to server3, and so on. After all servers in the list have received one request, assignment begins with server1 again. If a server fails, LB avoids sending connections to that server and selects the next server instead.

3. Weighted

Assigns a performance weight to each server. Weighted load balancing is similar to least connections, except servers with a higher weight value receive a larger percentage of connections at a time. You can assign a weight to each real server, and that weight determines the percentage of the current connections that are given to each server. The default weight is 0.

For example, in a configuration with 3 servers of various weights, the percentage of connections is calculated as follows:

Weight server1 = 20
Weight server2 = 30
Weight server3 = 50

Total weight of all servers = 100

The result is that server1 gets 20/100 of the current number of connections, server2 gets 30/100, server3 gets 50/100. If a new server is added then the percentage on existing servers should be reduced to match it to 100 percent. So reduce load on any server for example in this case reduce it on server3 to 25 and add server4 with 25 capacity , then server4 gets 25/100.

No comments:

Post a Comment