Size a database or upstream connection pool with Little's law, and see the queue wait a pool that is too small produces.
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.
Connection Pool
connections busy = request rate × hold time (Little's law, L = λW); recommended pool = that figure × safety factor.
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.
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.
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.