Interview Q&A / System Design

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What are the common load balancing algorithms?

SHORT ANSWER

Round robin hands requests out in turn, weighted round robin favours stronger servers, least connections picks the least busy server, and IP hash sends the same client to the same server.

Explain it simply

A load balancer needs a rule to pick a server for each request. Think of a bank manager directing customers to counters.

  • Round robin: counter 1, 2, 3, then back to 1. Simple and fair when requests cost about the same.
  • Weighted round robin: a counter with a faster clerk gets more customers. Use when servers differ in power.
  • Least connections: send the next customer to the counter with the shortest queue. Good when requests vary a lot in duration, such as long downloads next to quick lookups.
  • IP hash: hash the client IP so the same person always reaches the same counter. Gives simple stickiness without cookies.
  • Random with two choices: pick two servers at random and send to the less loaded. Cheap and surprisingly effective at large scale.

Health checks sit on top of all of these: a server that fails its check is removed from rotation.

Example

Three servers, weights 3:1:1 (S1 is twice as strong as needed relative to others).

text
Requests 1..5 with weighted round robin:
R1 -> S1
R2 -> S1
R3 -> S1
R4 -> S2
R5 -> S3
Then the cycle repeats.

S1 receives 60% of traffic, S2 and S3 20% each.

What to say in the interview

"Round robin is the default for equal servers and similar requests. Weighted variants handle unequal hardware. Least connections suits uneven request durations. IP hash gives affinity. All of them rely on health checks to skip dead servers."

#load-balancing#algorithms

Related questions

Practise more System Design questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open System Design quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.