What is a Load Balancer? — Every Software Engineer must know

Hello everyone. In this article, we are going to see about the load balancer, which is one of the important components of a distributed system. We will see about load balancer and its benefits to start with. Then we will look into the different types of load balancers and also about the various load-balancing algorithms. We will then go through container load balancing and end this article by comparing the load balancer with the API Gateway. Let's get started.

Image Source: https://miro.medium.com/max/1400/1*T4TFaAuYumJnIOwNaD1_3A.png

What is a Load Balancer?

In a client-server architecture, there will be a lot of clients like mobile, web, IoT, and so on. To serve these clients, there will be not just one Server but a lot of them based on the traffic load. Modern high‑traffic websites must serve hundreds of thousands of concurrent requests from users or clients and return the correct text, images, video, or application data. To meet these demands, we need to add a lot of processing power in the form of adding more servers.

Image Source: https://www.cloudflare.com/resources/images/slt3lc6tev37/25mxQ7enQpLxkGkPA65ThD/dedd9667bc99943c8f224b914307316b/without_load_balancing_diagram.png

In the above diagram, it can be seen that Server 1 is overloaded without a load balancer.



Dineshchandgr - A Top writer in Technology

Principal Software Engineer and Technical Lead focussed on Backend Engineering who likes to upgrade the tech skills and share knowledge to the community