Skip to main content

Load Balancer

Updated: October 30, 2026
By Willya Randika

A load balancer sits in front of a group of servers and decides which one handles each incoming request. It receives the traffic first, picks a backend by a chosen rule, then forwards. The part people forget is that it also decides where traffic must not go, through health checks.

Distribution methods

Round-robin cycles through servers evenly and ignores real load. Least-connections sends each request to the server with the fewest active connections. IP hash maps the same visitor to the same backend. Sticky sessions, or session persistence, keep one visitor on one server, which matters when the application stores login state in server memory: without it the next request lands on a different machine that has no idea who you are, and the visitor is bounced back to the login page.

Health checks and failover

The balancer probes every backend on a schedule. A machine that dies or starts returning errors is pulled from rotation until it recovers, so visitors never see its broken response. If all backends fail, what is left is a 503 from the balancer itself. Compare that with round-robin DNS, which simply lists several addresses in A records. There is no probe, no knowledge of server state, and a dead machine keeps receiving traffic until the record expires, so failover is slow and unreliable. For the timing involved, see TTL (DNS).

When you actually need one

A single VPS with correct caching covers most sites. A balancer makes sense when traffic has outgrown one machine and upgrading specs no longer helps, when downtime carries a real cost such as a store that peaks during a campaign, or when you already run several servers that can replace each other. Otherwise the concept mainly earns its keep by helping you read hosting specs critically.

Costly mistakes

Buying a balancer before the bottleneck is clear. If the slow part is a database query, extra servers just add more connections to the same database, so check MySQL first. Treating a balancer as a guarantee of uptime is another error, because it only helps when more than one healthy server can serve traffic. One server behind a balancer is still a single point of failure with an extra bill.

FAQ

Do load balancers make a site faster?

They do not speed up a single request. They stop one server from being overwhelmed so more requests keep getting served during a spike.

Why is round-robin DNS not a load balancer?

DNS hands out a list of addresses and never checks them. A dead server still receives traffic until the record expires, so there is no real failover.

What are sticky sessions for?

They keep the same visitor on the same backend. You need them when login state lives in server memory, and you can avoid them by moving sessions to shared storage.

Disclaimer: Hosting Wiki articles are prepared for educational and reference purposes. Hosting technology keeps evolving, so some technical details may change over time.