Load balancing is a concept that is used to increase the performance and uptime of the web servers. In load balancing, the network traffic is equally distributed to a group of servers, so that any one server would not get overloaded. A load balancer is a device that sits between the server and the user.
Why is Load Balancing necessary?
- Scalability: Load balancers help in scaling the website. Load balancers intelligently manage a huge amount of incoming traffic and distribute the traffic into multiple servers.
- Availability : There may be situations, when any one or group servers are down due to maintenance or other issues, in that case load balancer will redirect the network traffic to the servers which are running.
- Performance :Load balancers improve the performance of the site, they distribute the traffic in such a way, that no server gets overloaded resulting in slow response or server crash.
Load Balancing Algorithms
- Static Load Balancing: This algorithm follows a fixed rule to distribute the traffic across the servers. This doesn’t examine the server’s current state.
- Dynamic Load Balancing: This is a flexible algorithm, that distributes the traffic according to the servers’s current state like load on the server.