What Is a Load Balancer?
A load balancer distributes incoming network requests across multiple backend servers, so no single server is overwhelmed and the overall system can handle m...
Published October 9, 2026
A load balancer distributes incoming traffic across multiple servers so none is overloaded, and removes unhealthy servers from rotation. It improves availability and lets you scale horizontally.
The concept
It uses an algorithm to choose a backend (round robin, least connections, IP hash) and health checks to skip dead servers.
Layer 4 balancers route by IP/port; layer 7 balancers understand HTTP and can route by URL or header.
Spread the load
Practical examples
Nginx upstream
upstream app { least_conn; server 10.0.0.1:3000; server 10.0.0.2:3000; }
server { location / { proxy_pass http://app; } }Health endpoint
app.get('/health', (req, res) => res.sendStatus(200))Sticky sessions (avoid if possible)
upstream app { ip_hash; server a; server b; }Common mistakes
- Keeping session state on individual servers.
- No health checks.
- Making the load balancer itself a single point of failure.
Key takeaways
- Spread traffic, skip unhealthy nodes.
- Needs stateless servers.
- Make the balancer redundant.
FAQ
Which algorithm is best?
Round robin is the simple default; least connections suits uneven request cost.
Hardware vs software?
Cloud load balancers and Nginx/HAProxy cover most needs.