Load Balancer
In simple terms
You open a bakery shop and hire your brother to take phone orders. For the first few weeks, you only get two or three calls per evening, so you get by with just one phone line and only your brother assisting you.
Then, someone posts a fantastic review of your place on uber eats and the business explodes. Now you’ve got dozens of calls per night, your brother can’t keep up, and customers aren’t getting through because your one measly phone line is always busy.
So, you hire your brother’s university friends to be his fellow phone operators, and you call the phone company to set up additional lines. They set it up so that when a customer dials your number, it will ring to whichever one of your phones isn’t busy at the moment.
Now, you can accept multiple calls at the same time. Replace phone lines with web servers and you’ve got the idea. Basically, routing incoming requests to whoever operator is the least busy, even though to your customers it all looks like one phone number.
As shown in the figure before when it launched, Pokémon GO used Google’s regional Network Load Balancer (NLB) to load-balance ingress traffic across a Kubernetes cluster. Each cluster contained pods of Nginx instances, which served as Layer 7 reverse proxies that terminated SSL, buffered HTTP requests, and performed routing and load balancing across pods of application server backends.
In technical terms
Load balancing, commonly referred to as server farming or server pools, is the process of efficiently dispersing incoming network traffic among a collection of backend servers. Modern high-traffic websites must quickly and reliably respond to hundreds of thousands, if it’s not millions, of concurrent user or client requests for the right text, photos, videos, or application data. Modern computing best practise typically necessitates the addition of extra servers in order to cost-effectively scale to handle these enormous volumes.
A load balancer serves as the “traffic cop” in front of your servers, distributing customer queries across all servers equipped to handle them in a way that maximises speed and capacity utilisation and makes sure that no server is overloaded, which can result in performance degradation.The load balancer distributes traffic to the active servers in case one server goes offline. The load balancer initiates requests to a new server when it is added to the server group.
A load balancer does the following tasks in this way:
- Effectively divides client requests or network strain among several servers.
- Sending queries solely to online servers ensures excellent availability and dependability.
- It allows you the option to add or remove servers as necessary to meet demand.
Thanks for reading. If you loved this article, feel free to hit that follow button so we can stay in touch.
This article is possible because of these references. some external links in this post are affiliate.