SteelReed

Search

Search posts, questions…

System DesignQuestion 6 / 26

Junior

How does a load balancer work, and which balancing algorithms are there?

Short answer

A load balancer sits in front of identical servers and sends each request to a healthy one using an algorithm. It enables horizontal scaling and raises availability: dead machines are dropped.

DNSalgorithm picksremovedClientLoad balancerHealth check:which servers are up?Healthy serverFailed server

3 points to say:

  1. Health checks remove broken servers.
  2. Uneven request lengths: least connections.
  3. Stateless apps need no sticky sessions.

Keep reading the deep dive

Create a free account to read the full explanation and follow-up questions, mark questions as studied and review them on a schedule.