Common Load Balancing Algorithms Explained
Load balancers use different algorithms to decide which backend server should handle each incoming request, balancing factors like simplicity, fairness, and...
Published November 18, 2026
A load balancer picks which server gets each request using an algorithm. The common ones are round robin, weighted round robin, least connections, IP hash and least response time.
The concept
Round robin cycles through servers in order — simple, fair when requests cost the same. Weighted variants send more traffic to bigger servers.
Least connections sends to the server with the fewest active requests, better for long or uneven requests. IP hash keeps a client on the same server (sticky sessions).
Round robin vs least connections
Practical examples
Nginx algorithms
upstream app {
least_conn; # or ip_hash; or default round robin
server 10.0.0.1 weight=3;
server 10.0.0.2;
}Weighted round robin idea
const pool = ['A','A','A','B'] // A gets 3× traffic
let i = 0
const next = () => pool[i++ % pool.length]Health checks
server 10.0.0.1 max_fails=3 fail_timeout=30s;Common mistakes
- Sticky sessions that unbalance load.
- Round robin with very uneven request costs.
- No health checks.
Key takeaways
- Algorithm decides the target server.
- Round robin = simple, least connections = adaptive.
- Combine with health checks.
FAQ
Which is the default choice?
Round robin, or least connections for long-lived requests.
What is consistent hashing?
A hash scheme that minimises remapping when servers are added or removed.