Load Balancer

Explore how traffic is distributed across multiple servers using different algorithms and health check strategies.

Goal: Understand how balancing policy and health checks affect fairness, latency, and failures.Try: Mark one server slow or failed, then turn health checks off and compare the error rate and distribution metrics.
Load Balancer Simulation
INTERNET
NGINX LB
Health ON
Conns0
S10
Conns0
S20
Conns0
S30
Conns0
S40

Strategy

Controls

Traffic120k req/s
Live Metrics
Fairness100%
Avg Latency20ms
Error Rate0.0%

Round Robin ensures perfect fairness but ignores server load variations.

What's happening?

A load balancer sits in front of your server pool and distributes incoming requests based on the chosen strategy. Animated dots show live traffic flowing from the internet through the balancer to individual servers. Click the and icons on any server to simulate slowdowns or failures — watch how the balancer responds.

Why it matters?

Load balancing is essential for high availability and horizontal scalability. Without it, a single server becomes a bottleneck. Health checks automatically remove failed nodes from the pool. The right strategy depends on your workload: Round Robin for uniform requests, Least Connections for variable processing times, Random for simplicity at scale.

Why this exists

Load balancing exists to spread requests across healthy servers so no single instance becomes the choke point. The algorithm matters less than the guarantees: distribution, health awareness, and graceful failure handling.

Distribution protects the tier

A load balancer turns a server group into one logical endpoint and prevents accidental hot-spotting on a single machine.

Health checks are non-negotiable

Balancing across unhealthy servers is worse than not balancing at all. Real load balancers continuously validate targets.

Algorithm is context-dependent

Round robin is simple. Least connections and latency-aware choices help when request cost varies widely.

Key takeaways

  • Load balancers scale stateless tiers by turning many instances into one entry point.
  • Health checks and failover matter as much as raw distribution.
  • Session affinity can help some workloads, but it reduces flexibility.
  • A load balancer is a control plane for traffic, not just a router.