Load Balancer

A head host at a bustling restaurant directing incoming guests evenly across available tables.

Definition A load balancer is a traffic controller for internet services that evenly distributes incoming user requests across multiple servers. It prevents any single computer from getting overwhelmed and crashing the entire website.

Opening Lanes at a Toll Booth

What happens if only a single lane is open at a highway toll plaza during rush hour? Cars back up for miles, creating a massive traffic jam. But if you open ten toll lanes and have an attendant guide drivers quickly to open booths, traffic flows smoothly without delay.

The digital world works exactly the same way. When thousands or millions of fans rush to buy concert tickets on Ticketmaster or register for college courses, massive waves of requests hit a website at once. If only one server is handling all those requests, it gets overwhelmed, freezes up, and crashes.

That is why large services set up multiple identical servers running side by side. Right in front of them stands a load balancer. It acts as a digital traffic director, distributing incoming traffic evenly across available servers so no single machine overheats or breaks down.

Load Balancing Principle Many Users Load Bal. Distributed Svr 1 Svr 2 Svr 3

How Does It Decide Where to Send You?

A load balancer uses smart distribution rules, called algorithms, to route incoming traffic. The simplest approach is taking turns in a circle: sending the first visitor to Server 1, the second to Server 2, and the third to Server 3. This sequential method is called 'Round Robin.'

However, not all tasks require the same amount of effort. One visitor might read a quick article and leave, while another stays connected for hours downloading a massive video file. That is why many load balancers route new visitors to whichever server currently has the fewest active connections in real time.

Servers can also differ in processing power. A powerful, modern server might comfortably take three tasks at a time, while an older server receives just one. By adjusting routing based on each server's capacity and workload, the system runs at maximum efficiency.

A Closer Look: Filtering Out Broken Servers

In technical terms, a load balancer does more than just hand out tasks. It constantly performs 'health checks,' sending rapid signals several times a second to ensure every server is working properly.

What happens if one server suddenly crashes? The load balancer immediately detects the missing response and stops sending traffic there. Instead, it reroutes all visitors to the healthy, functioning servers. It acts as a safety shield that automatically weeds out failing servers before users notice any trouble.

As a result, even if several machines crash unexpectedly, visitors enjoy uninterrupted service without seeing an error page. And when traffic spikes, engineers can easily hook up new servers in the backgroundโ€”the load balancer will automatically detect them and start sharing the load.

Load Balancer Fault Detection & Rerouting Diagram User Req Load Bal Block Req OK Svr Fail Svr OK Svr

๐Ÿค” Common misconceptions

โœ• Myth

Installing a load balancer speeds up the raw computing power of individual servers.

โœ“ Fact

It does not boost a computer's CPU speed. Instead of making one person work at superhuman speed, it hires multiple workers and shares the workload fairly to cut down overall wait times.

๐Ÿงบ Where you meet it

1 Preventing ticketing sites from crashing when millions of fans scramble for concert tickets at the exact same minute.
2 Distributing global streaming traffic across thousands of servers for platforms like Netflix or YouTube.
๐Ÿ’ก In one sentence

A load balancer distributes incoming web traffic across multiple servers, preventing overload and keeping websites running smoothly.