SimuVedaSystem Design Lab Open in the lab

Scaling data / Beginner / 7 min

Servers behind a load balancer

Round robin vs least connections, health checks, crashes, traffic spikes and auto-scaling.

Start the simulation → Change the load, break a part, watch what happens. Free, no sign-up.

In short

What it is
A load balancer spreads requests over many servers using a rule such as round robin, least connections or weighted.
Why it matters
One server has a limit; many servers behind one address give more capacity and survive a crash.
The trade-off
Round robin ignores how busy a server is, so a slow server overloads; health checks take time to notice a dead one.
Say it in an interview
"I would use least connections with health checks, so slow or dead servers stop getting traffic."

Check yourself

Servers have different speeds. Which algorithm naturally sends less work to the slow one?

Answer: Least connections. A slow server keeps requests longer, so it has more open connections and least connections routes around it.

A server crashes. Why do some requests still fail for a few seconds?

Answer: The load balancer keeps sending traffic until health checks mark it down. Health checks run on an interval and need a few failures before the server is pulled from rotation.

Auto-scaling is on and traffic triples suddenly. Why are there still errors at first?

Answer: New servers take time to boot before joining the pool. Scaling reacts after load is seen and instances need time to start, so you need headroom for the gap.

See it happen in the simulation →

load balancerautoscalinghealth check

More in scaling data