Skip to content

2.4. Load Balancing

A load balancer decides which instance serves each request, and that decision determines your tail latency, your blast radius during a partial outage, and whether a single hot backend can take down the fleet. The mechanics differ sharply by layer: an L4 balancer moves packets without understanding them, while an L7 balancer reads the request and can route on content — at higher cost. This chapter covers the algorithms, the connection-versus-request distinction that HTTP/2 makes critical, and health-aware routing that pulls failing nodes before users notice.