Toolkit.
Simulator · Study Hall

Load Balancer

Watch how your traffic gets distributed across servers.


Interactive
Push on the parts yourself.

The load balancer workspace from the original build will sit here — same logic, same controls, restyled for Study Hall. Prose below covers what you'll be able to do.

Ever set up a load balancer and wondered if you picked the right algorithm? This simulator lets you throw requests at a cluster of servers and see exactly which one handles each request. Flip servers off to simulate failures and watch the traffic reroute.

Why mess with a simulator?

Debugging load balancing in production is a nightmare. Here you can see exactly why Server 3 is getting hammered while Server 2 sits idle. Helped us catch a misconfigured weight before we deployed.

Algorithms you can try

Round Robin (the classic), Weighted Round Robin (when servers aren't equal), Least Connections (for long-lived connections like websockets), Random (surprisingly effective), and IP Hash (for session stickiness). Each one distributes differently—you'll see it immediately.

Simulate the chaos

Click a server to take it down. Watch the traffic redistribute. Bring it back up. Adjust weights. It's way more satisfying than reading docs, and you'll actually remember how each algorithm behaves.

Good for

  • Test load balancer configurations before production deployment
  • Understand how algorithms handle server failures and recovery
  • Visualize traffic distribution fairness across server pools
  • Educate team members on load balancing concepts
  • Compare algorithm performance for your infrastructure

Questions people ask

Which algorithm should I pick?

For most web apps, Round Robin or Least Connections work great. Use Weighted if your servers have different specs. IP Hash gives you sticky sessions without cookies. Random is underrated—it's simple and surprisingly fair for large request volumes.

How realistic is this?

The algorithms match what NGINX, HAProxy, and cloud load balancers do. The numbers are simplified for visualization, but the behavior patterns are accurate.

Can I test failure scenarios?

Yep, that's half the point. Toggle servers on/off and watch how each algorithm handles the redistribution. Some are more graceful than others.