bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/System Design/Building Blocks
System Design•Building Blocks

Load Balancing & Stateless Services

A load balancer spreads traffic across interchangeable, stateless app servers so any instance can serve any request and failed nodes drop out cleanly.

Key ideas

  • Keep app servers stateless — put session/user state in a shared store or a signed token, never on one instance.
  • Use health checks so the balancer stops routing to unhealthy nodes.
  • L4 (transport) load balancing is fast and protocol-agnostic; L7 (application) routing can read paths/headers for smarter decisions.

Compare

LayerWhat it sees
L4IP/port — fast, no app awareness
L7HTTP path/headers — content-based routing, TLS termination

Tip

Statelessness is what makes horizontal scaling and zero-downtime deploys possible.

Next

Caching & CDNs