learn/System Design/Load Balancing
ScalingCore interactive

Load Balancing

Spread traffic across servers, no single hotspot.

load_balancer
round-robin
clients
LB

Requests spread across the pool — no single server becomes a hotspot.

How it works

A load balancer sits in front of a server pool and distributes incoming requests so no one machine is overwhelmed. Strategies range from round-robin to least-connections to weighted routing, with health checks that pull dead nodes out of rotation.

Mental models

  • Round-robin, least-connections, IP-hash, and weighted are the staples.
  • Health checks + automatic failover keep traffic off dead servers.
  • L4 balances on IP/port; L7 understands HTTP paths and cookies.

Reach for it when

  • Horizontal scaling
  • Zero-downtime deploys
  • Geographic routing