Skip to content
ENExplore Calculators

Connection Pool Calculator

Size a database or upstream connection pool with Little's law, and see the queue wait a pool that is too small produces.

About Connection Pool Calculator

Little's law says the average number of items in a system equals arrival rate times time in system, so the connections genuinely busy at any moment is just the request rate multiplied by the hold time. A safety factor covers arrival jitter, since traffic is never perfectly smooth. Oversized pools are as damaging as undersized ones — every pooled connection is a backend process holding memory and a lock slot, which is why a 1200 rps service needs about 29 connections, not 300.

Formula

Connection Pool

connections busy = request rate × hold time (Little's law, L = λW); recommended pool = that figure × safety factor.

λ
Arrival rate in requests per second
W
Time a request holds a connection, including network round trip

Worked example

With the default values below, Connection Pool Calculator returns Recommended Pool Size of 29. Change any input above and every figure here is recalculated in your browser.

Inputs used

Requests per secondaccepts 0.1–10,000,000 rps
1,200 rps
Average time a connection is heldaccepts 0.01–600,000 ms
18 ms
Safety factor for burstsaccepts 1–5 ×
1.3 ×
Pool size currently configuredaccepts 1–100,000 connections
40 connections

Results

Recommended Pool Size
29
Connections Busy on Average
21.60
Configured Pool Utilisation
54.0%
Maximum Rate the Pool Supports
2,222 rps
Average Wait for a Connection
0.00 ms
Assessment
Well sized

Step by step

  1. 1Values used
  2. 2Connection Pool
  3. 3Recommended Pool Size= 29
  4. 4Connections Busy on Average= 21.60
  5. 5Configured Pool Utilisation= 54.0
  6. 6Maximum Rate the Pool Supports= 2,222 rps
  7. 7Average Wait for a Connection= 0.00 ms
  8. 8Assessment= Well sized

Assumptions and limits

  • The result is derived only from the 4 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 Connection Pool calculated?

connections busy = request rate × hold time (Little's law, L = λW); recommended pool = that figure × safety factor. Little's law says the average number of items in a system equals arrival rate times time in system, so the connections genuinely busy at any moment is just the request rate multiplied by the hold time. A safety factor covers arrival jitter, since traffic is never perfectly smooth.

Why does Connection Pool matter?

Oversized pools are as damaging as undersized ones — every pooled connection is a backend process holding memory and a lock slot, which is why a 1200 rps service needs about 29 connections, not 300.

What values do I need to enter?

This calculator takes 4 inputs: Requests per second, Average time a connection is held, Safety factor for bursts, Pool size currently configured. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Connection Pool Calculator – Calculate Recommended Pool Size