Why does load balancing algorithm choice matter beyond just 'distribute traffic evenly'?
Different algorithms optimize for different things: round robin assumes every request and every server are roughly equivalent, which breaks down when requests vary wildly in cost or servers vary in capacity. Least-connections routes toward currently-idle capacity rather than blindly cycling through servers. Consistent hashing keeps a given client or key routed to the same backend across requests, which matters when server-side session state or caching depends on request affinity.
Answered in
Scalability, Performance, and Elasticity Are Not the Same ProblemA fast system can still fail to scale, and an elastic system can still be slow. Confusing the three leads to fixing the wrong bottleneck.
Read the full analysisOther questions this article answers
More system design & architecture questions
- How much spare capacity should a gateway keep?
- Why are bounded queues important for availability?
- Should a load balancer always move requests away from an unhealthy server?
- Can a circuit breaker prevent every cascading failure?
- Why does pagination improve API performance beyond just 'smaller responses'?
- Why is asynchronous logging faster than writing logs synchronously?
- When does caching actually help API performance, and when doesn't it?
- Why does payload compression trade CPU time for network time, and when is that worth it?
Every answer on Crashtech is written by the editor of the article it comes from — never auto-summarised. Browse all answers or the System Design & Architecture beat.