Answer:
What is load balancing?
- Load balancing in a cloud distributed system means efficiently distributing the load to the server pool(bunch of servers that are connected together) in a way so that any one server doesn't have to face the pressure of load. Each load balancer stays in between the servers and the clients.
These load balancing software or hardware based load balancers use different algorithms to distribute the load across the servers. Some of the algorithms are:
- Round Robin: In this algorithm a virtual server gets the client request and forwards to a server based on routing list and process it in there. But in this algorithm there is a problem that one server may take huge number of processing request and get overloaded.
- Least Connection Method: As round robin doesn't see the server load, but this method evaluate the server first so it removes the problem of round robin and the virtual server that will be following this method will only send to the servers which is having least active connection to balance the load.
- Least Response Time Method: It also works like least connection method but a little better. In this method a health monitoring request is sent to the servers and depending on the response time it evaluates which server will be giving best experience to the users and assign that server for the user.
- Least Bandwidth Method: In this method it looks for the server that is having the least amount of traffic with the bandwidth measured in Mbps.
- Hashing Method: This method works with the hash value that is coming and using the header information or the port address, destination address it makes decision.
- Custom Load Method: In this method a query is made to the server by SNMP(Simple Network Management Protocol) and these query contains the information like CPU time, processing time, response time. Depending on that this method takes decision.