Load Balancer Simulator — Interactive System Design Lab
Simulate traffic across multiple servers using different load balancing algorithms. Watch how request distribution changes under round-robin, least-connections, and random strategies. Take individual servers offline to see how the balancer routes around failures — and understand when each approach is the right choice in a real system design interview.
Compare round-robin, least-connections, and random routing — and kill servers to test fault tolerance.
This free interactive simulation runs directly in your browser — no account needed. Adjust the parameters and watch how the system responds in real time.
What you're looking at
Three servers sit behind a load balancer, and a client waits on the left with a single Send Request button. Each click sends one request through the gateway, which picks a server, animates the trip, and holds the connection open for a moment before releasing it — that hold time stands in for how long each server takes to do its work, and it's different for each server, so the same click can resolve fast or slow depending on where it lands.
The strategy buttons across the top — Round Robin, Random, and Least Connections — change how the gateway makes that pick. Each server card tracks its own Load (requests it's currently holding) and Total (requests it's handled since your last reset); switch strategies mid-run and both persist — only Round Robin's own position in the rotation resets to Server 1. A small toggle on each card takes that server offline or brings it back — the "X/3 online" count next to the gateway updates immediately. Everything that happens gets a timestamped line in the Live Activity Log on the right, including which server a request landed on and, for Least Connections, the load it saw when it decided.
Things to try
Switch to Least Connections and click Send Request five or six times as fast as you can. The first few spread evenly — every server starts at Load 0, so the tie goes to whichever one comes first. Keep clicking, though, and one server pulls ahead in Total: the one that happens to finish fastest becomes "least loaded" again sooner than the others, so it keeps winning the tie-break. Least Connections isn't rewarding a fast server on purpose — it's just reading current load, and current load recovers faster on a server that clears its queue quickly.
Now reset and run the same burst under Round Robin. The log reads Server 1, 2, 3, 1, 2, 3 in order every time, and after six clicks each server's Total lands on exactly 2 — an even split no matter which server is still busy when its turn comes back around. Round Robin has no idea any server is still busy; it just advances a counter.
Take a server offline mid-run using its card's toggle, then send a few more requests under whichever strategy is active. Watch the "X/3 online" count drop and the offline server's card gray out — the next requests only ever land on the two that are left, and the log confirms it, request by request. Bring it back with the same toggle and it immediately rejoins the rotation.
Take all three offline. A red banner appears warning that requests will be dropped, and clicking Send Request now, instead of a routing line, adds "All servers are down! Request dropped." to the log — there's nowhere left to send it.
What this tells you
Round Robin and Random are cheap and stateless — they don't need to know anything about server health beyond "up or down," which is exactly why they're easy to reason about and easy to get wrong under uneven load. Least Connections trades that simplicity for feedback: it has to track live state on every server, but in return it stops sending work to something that's already behind. Neither strategy, though, saves you from the last experiment — a load balancer only routes around unhealthy servers it already knows about, and if every server it's tracking is down, distributing the failure evenly is not the same as avoiding it.
Concepts covered
- load balancer
- round robin
- least connections
- traffic distribution
- horizontal scaling
- fault tolerance
- server failover
- health check
Read the guide
- Load Balancing — The unsung hero of scalability. It protects your servers from crushing load and gives you the freedom to fail without downtime.
Related articles
- How to Answer Any System Design Question — A step-by-step framework for tackling any system design interview question — requirements, estimation, high-level design, and deep dives — with a full worked example (Design a URL shortener) and the phrases interviewers listen for.
- Top 10 System Design Interview Questions — The most frequently asked system design interview questions — URL shortener, rate limiter, key-value store, news feed, chat, and more — with the approach, key trade-offs, and follow-up questions interviewers actually ask for each one.