All articles
Activated ThinkerJun 13 min read

DIGITAL TRAFFIC POLICE OF THE INTERNET

LOAD BALANCING

Cover image for DIGITAL TRAFFIC POLICE OF THE INTERNET

When requests piles up

Think of the backend as the worker inside a shop. When a customer ( a request ) comes in, the worker serves them by fetching what they need from storage.

Now, just imagine:

  • If one customer comes in, the worker can handle them easily.
  • If three customers arrive to the shop at the same time, only one customer gets served immediately, the other two end up waiting.
  • If customers keep on arriving, the shop becomes overcrowded — this is what we called as traffic in software systems.

Illustration of a coffee shop with one barista serving a customer at the counter while five more customers wait in line, some visibly impatient

Multiple customers ends up waiting in queue.

when too many request hit a single backend, the system slows down and eventually crashes, just like the workers slow down when too many people arrive at the shop at once.

That’s where LOAD BALANCING saves the day.

What is Load Balancing?

Load Balancing is like hiring multiple workers for the shop and adding a manager at the entrance.

When customers comes in, the manager (load balancer) checks which worker is free and direct the customer to the right worker so that no one gets overloaded.

In tech it works the same way, the load balancer sits between the frontend (where all the requests from the user comes in) and the backend servers ( where all the actual work happens). The Load Balancer distributes the incoming requests across multiple backend servers for smooth performance and to prevent overload.

Diagram showing a laptop, phone, and tablet sending requests through a load balancer that routes them across three backend servers

Have a look at how the Load Balancer is distributing multiple requests across servers to keep the traffic smooth.

It acts like a digital traffic police for web requests — guiding request to move in the right direction so everything flows without jams. Unlike the real traffic cop from your local signal who tends to create more chaos than managing it, this digital traffic police ensures traffic run smoothly.

Types of Load Balancing

The different types of technique that are commonly be used by a load balancer:

  • Round Robin — Requests are distributed one by one to the servers in order.
  • Least Connection — Requests are directed to the servers that is having the least users.
  • IP Hash — Requests are forwarded depending on the client’s IP address.

Animated diagram of IP Hash load balancing: three client IP addresses on the left are routed by the load balancer to three servers on the right based on the client's IP address

Here are three tricks the digital traffic police uses to keep the web flow smoothly without jams.

The Hidden Manager

Load Balancing is not just a technology term — it’s like an hidden manager that ensures the internet to run smoothly without any traffic or chaos, just like your Wi‑Fi which quietly manages Netflix and Instagram running at the back while you are stuck on a Zoom call with your team leader.

So, the next time when you are enjoying a latest released movie on Netflix, just remember there is a digital traffic police working behind the scenes.

View original on Medium

Comments