Interview Prep/Networking/Load Balancing, Proxies & CDN

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 →

  1. Round robin is fine when requests are short and equal
  2. Least connections (least_conn in Nginx, leastconn in HAProxy) is better when requests vary in duration, such as uploads and WebSockets
  3. ALB offers round robin and least outstanding requests
  4. 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.

All Networking questions Roadmap: Networking for DevOps

More on Load Balancing, Proxies & CDN