Topics

Least Connections load balancing routes new requests to server with fewest active connections. It’s dynamic as opposed to static methods like round robin load balancing.

How it works

  • Tracks active connections per server
  • Assigns new request to least busy server
  • Automatically adapts to changing loads

When to use

  • Servers have different capacities
  • Request processing times vary significantly
  • Need automatic load adjustment

Pros vs Round Robin

  • Better for unpredictable traffic
  • Handles variable request durations
  • More resource-efficient for unequal servers

Limitations

  • Requires connection tracking
  • Overhead from maintaining state of active connections
  • Short-lived connections cause rapid spikes in connection counts, leading to frequent rebalancing