System Design Foundations · Part 2 of 8
Load Balancers: The Traffic Controller of Your Backend
“Learn how load balancers distribute requests, perform health checks and remove single-server bottlenecks.”
Load Balancers: The Traffic Controller of Your Backend
Once one application server is no longer enough, we can run multiple copies of the application.
But this creates another question:
Which server should receive each request?
A load balancer solves this problem.
Clients communicate with one stable endpoint while the load balancer distributes requests across healthy servers.
What Does a Load Balancer Do?
Common responsibilities include:
- distributing traffic,
- checking server health,
- terminating TLS,
- routing based on host or path,
- removing unhealthy servers,
- draining traffic during deployment.
Round Robin
Request 1 → Server A
Request 2 → Server B
Request 3 → Server C
Request 4 → Server A
Least Connections
If requests have different durations, the load balancer can prefer the server handling the fewest active connections.
Health Checks
GET /health/ready
200 OK
A load balancer does not magically make the whole system highly available. Databases, caches and the load-balancing layer itself still need failure planning.
Horizontal scaling becomes easier when application servers do not rely on local memory for important shared state.
Finished this article?
Mark it done to update your series progress.