Load Balancer
Explore how traffic is distributed across multiple servers using different algorithms and health check strategies.
Traffic controls
Change inputs and watch the system react.
Live architecture
Traffic dots move toward the servers receiving load.
Clients
260/sec
Load Balancer
routes requests
Insight
What changed
Requests are distributed evenly across servers.
Why it matters
This works well when servers have similar capacity.
Tradeoff
It ignores current load, so slow servers may still receive traffic.
Mini challenges
Can the system meet the goal?
Change controls above. Cards solve immediately when the system satisfies the condition.
Keep latency below 120ms
Handle 2x traffic without errors
Survive one server failure
Avoid server hotspot
Pick sticky session strategy
Summary
- Load balancers distribute requests so one server does not absorb all traffic.
- Algorithms change behavior: even routing, load-aware routing, weights, affinity, or randomness.
- Health checks protect availability by avoiding failed servers.
- Scaling helps latency, but shared dependencies can still become bottlenecks.
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.