Round robin versus least connections: when does it matter?
BeginnerScenarioLoad Balancing, Proxies & CDN
Answer
Situation read → Algorithm choice matters when requests have uneven cost.
What I'd do →
- Round robin is fine when requests are short and equal
- Least connections (
least_connin Nginx,leastconnin HAProxy) is better when requests vary in duration, such as uploads and WebSockets - ALB offers round robin and least outstanding requests
- Switch algorithm and compare p99 latency per backend
Why → Counting active work spreads load by real effort instead of by turn.
Interview tip → Mention weighted variants for mixed instance sizes.
More on Load Balancing, Proxies & CDN
What is the difference between a Layer 4 and a Layer 7 load balancer?BeginnerWhen do you choose an ALB and when an NLB in AWS?BeginnerForward proxy versus reverse proxy: what is the difference?BeginnerHow do health checks work on a load balancer and what makes a good one?BeginnerWhat are sticky sessions and why would you avoid them?BeginnerWhat does a CDN do and when does it help?Beginner