Member-only story
Everything about Load Balancer with Cheat Sheet
The Load Balancers play a significant role in any System Design. And the beauty of its design is that every engineer takes it for granted that this will work — one of the best system designs, and there is a lot to learn from this simple yet powerful solution. The LB acts as a middle-man between clients and servers; the client sends requests to LB and internally, via physical NIC to VIPs, forwards to attached web servers.
Load Balancers
In a nutshell, Load balancing is distributing network traffic across multiple servers based on several different algorithms. Load balancing handles by a tool or application called a Load Balancer. A Load Balancer can be either hardware-based or software-based. Hardware load balancers require the installation of a dedicated load-balancing device; software-based load balancers can run on a server, on a virtual machine, or in the cloud.

Suppose the total traffic on the service converges only to a few machines. In that case, this will not only overload them, resulting in an increase in the application's latency and killing its performance, but it will also eventually bring them down.
Load balancing helps us avoid all this mess. While processing a user request, the load balancer automatically routes the future requests to other up-and-running servers in the cluster if a server goes down. It enables the service as a whole to stay available.
We can balance the Load at each system layer to utilize full scalability and redundancy. We can add LBs at three places:
- Between the user and the web server
- Between web servers and an internal platform layer, like application servers or cache servers
- Between the internal platform layer and the database.
Benefits of Load Balancing
- Users experience faster, uninterrupted service. Users won't have to wait for a single struggling server to finish its previous tasks. Instead, their requests were passed immediately on to a more readily available resource.
- Service providers experience less downtime and higher throughput. Even a complete server failure won't affect the end-user experience as the load balancer…