Load Balancing Techniques for System Design

Load Balancing in System Design Interviews
Load balancers distribute incoming network traffic across multiple servers to ensure no single server becomes a bottleneck. In system design interviews, you are expected to place load balancers at three layers: between clients and web servers, between web servers and application servers, and between application servers and databases.
Load balancing is the first component interviewers expect to see in any system design diagram. Not including one is an immediate red flag.
Load Balancing Algorithms
| Algorithm | Description | Best For |
|---|---|---|
| Round Robin | Distributes requests sequentially | Identical servers |
| Weighted Round Robin | More traffic to stronger servers | Heterogeneous fleet |
| Least Connections | Routes to server with fewest active connections | Long-lived connections |
| IP Hash | Same client IP → same server | Session persistence |
| Consistent Hashing | Minimize redistribution on server changes | Caching layers, distributed systems |
Layer 4 vs Layer 7 Load Balancing
Layer 4 (Transport) — Operates on TCP/UDP. Faster because it doesn't inspect packet contents. AWS Network Load Balancer handles 1M+ requests per second at Layer 4.
Layer 7 (Application) — Inspects HTTP headers, URLs, cookies. Enables content-based routing, A/B testing, and canary deployments. AWS Application Load Balancer operates at Layer 7.
When discussing load balancing in interviews, always mention health checks, graceful draining, and SSL termination. Practice with AissenceAI's system design AI helper.