← System Design learning pathSystem Design · Module 3 of 10
Load balancing
Distribute traffic across servers.
📖 Key ideas
- Load balancers spread requests across servers.
- Algorithms: round robin, least connections, IP hash.
- Health checks remove unhealthy servers.
- Layer 4 (TCP) vs layer 7 (HTTP) load balancers.
- Examples: Nginx, HAProxy, AWS ALB, Google Cloud LB.
💡 Real-life example: A load balancer is a toll plaza manager sending cars to the shortest queue.
Load balancerDistributes traffic
Round robinRequests in rotation
Health checkChecks server health
Layer 7 LBRoutes by HTTP content