Mission
Interactive Simulation
Before we explain anything — play. Push it until it breaks, then fix it.
Load
High variance = a mix of quick lookups and slow reports. Equal request counts ≠ equal work.
Balancer
Break it
What just happened?
Round-robin gave every server the same number of requests, but some requests take far longer — so one server melted while others idled. Least-connections routed by actual busyness and evened out the work. When a server died, only health checks stopped the balancer from sending it traffic into a black hole.
The concept
A load balancer distributes incoming requests across a pool of servers using strategies like round-robin, least-connections, or hashing. It also does health checks, removing dead servers from rotation. It's the enabler that makes horizontal scaling actually work.
Trade-offs
Nothing is free. Here's what this solution costs you.
In the real world
Conceptually similar to a cloud L7 load balancer with target health checks, or NGINX/Envoy upstream pools.
Mini quiz
Least-connections routing is better than round-robin when…
Interview me
The app becomes your interviewer. One question, in your own words.
Boss challenge
Lose a server under load
6K req/s of mixed fast and slow requests. Then API 1 crashes.
Goal: Keep the error rate under 1% with request variance at 50%+ and a server down.
Use the simulator above with no hints. These checks update live as you play.
Interview question
“Explain L4 vs L7, round-robin vs least-connections, and how health checks work.”