Skip to content
ENExplore Calculators

Least Connections Calculator

Model how least-connections balancing shifts new requests away from slow servers, and the arrival rate each member ends up with.

About Least Connections Calculator

Because the algorithm always picks the member with the fewest live connections, connection counts converge to equal across the pool. Little's law then forces the arrival rate to be inversely proportional to hold time, so a server that takes three times as long receives a third of the new connections. Least connections is self-correcting for slow servers, which is exactly why it hides them — a member can be badly degraded and still look healthy because its connection count matches everyone else's.

Formula

Least Connections

least connections equalises held connections, so each server's arrival rate is inversely proportional to its hold time: rate_i = λ ÷ Σ(1 ÷ factor_j).

factor
Ratio of the slow server's hold time to a healthy one
weight
Sum of inverse hold times across the pool

Worked example

With the default values below, Least Connections Calculator returns Connections Held per Server of 700. Change any input above and every figure here is recalculated in your browser.

Inputs used

Active connections across the poolaccepts 1–100,000,000 connections
4,200 connections
Servers in the poolaccepts 1–1,024 servers
6 servers
Servers responding slowlyaccepts 0–1,024 servers
1 servers
How much longer a slow server holds a connectionaccepts 1–50 ×
3 ×
New connections per secondaccepts 1–5,000,000 cps
3,000 cps

Results

Connections Held per Server
700
New Connections to a Healthy Server
562.5 cps
New Connections to a Slow Server
187.5 cps
Healthy-to-Slow Arrival Ratio
3.00 ×
Assessment
Least connections is correctly shedding load from the slow members

Step by step

  1. 1Values used
  2. 2Least Connections
  3. 3Connections Held per Server= 700
  4. 4New Connections to a Healthy Server= 562.5 cps
  5. 5New Connections to a Slow Server= 187.5 cps
  6. 6Healthy-to-Slow Arrival Ratio= 3.00 ×
  7. 7Assessment= Least connections is correctly shedding load from the slow members

Assumptions and limits

  • The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

How is Least Connections calculated?

least connections equalises held connections, so each server's arrival rate is inversely proportional to its hold time: rate_i = λ ÷ Σ(1 ÷ factor_j). Because the algorithm always picks the member with the fewest live connections, connection counts converge to equal across the pool. Little's law then forces the arrival rate to be inversely proportional to hold time, so a server that takes three times as long receives a third of the new connections.

Why does Least Connections matter?

Least connections is self-correcting for slow servers, which is exactly why it hides them — a member can be badly degraded and still look healthy because its connection count matches everyone else's.

What values do I need to enter?

This calculator takes 5 inputs: Active connections across the pool, Servers in the pool, Servers responding slowly, How much longer a slow server holds a connection, New connections per second. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Least Connections Calculator | Calcrivo