Per-Tenant Connection Pools as TTL Caches: Capacity and Cold-Start Trade-offs in Database-per-Tenant PostgreSQL

On PostgreSQL a connection serves one database, so a replicated service with a database per tenant keeps a pool per tenant on every replica. We model these pools as time-to-live (TTL) caches: a tenant-replica pair holds a connection only while its last request is younger than the pool's idle timeout plus housekeeping delay. Capacity: with a zero minimum idle size, expected tenant connections are at most total request rate times mean retention time, whatever the tenant count (measured: 100 to 10,000); with HikariCP's default positive minimum, they grow with every provisioned tenant. Cold starts: the same retention time sets the share of requests opening a connection, 66% at 2 req/s with a 30 s timeout under long-tailed popularity. Routing each tenant to one replica beats a longer timeout: it matches the cold-start share of a fourfold timeout with a third of its connections. The model predicted every pooler-free configuration mean on minikube and Amazon EKS within 4%, measured cold-start shares within 5 points, and the tenant at which HikariCP's defaults exhaust an Amazon RDS db.t4g.medium. Proxy poolers at their defaults multiply the count. Autovacuum CPU binds next, near 1500 idle databases on RDS. We derive rules for pools, timeouts, routing and poolers.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-01
DOI
https://doi.org/10.5281/zenodo.23859309
Primary Topic
Advanced Database Systems and Queries
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Per-Tenant Connection Pools as TTL Caches: Capacity and Cold-Start Trade-offs in Database-per-Tenant PostgreSQL

Kostiantyn Dementiev
3 links
Zenodo (CERN European Organization for Nuclear Research)
Advanced Database Systems and Queries
preprint

Per-Tenant Connection Pools as TTL Caches: Capacity and Cold-Start Trade-offs in Database-per-Tenant PostgreSQL

Kostiantyn Dementiev
preprint en

Abstract

On PostgreSQL a connection serves one database, so a replicated service with a database per tenant keeps a pool per tenant on every replica. We model these pools as time-to-live (TTL) caches: a tenant-replica pair holds a connection only while its last request is younger than the pool's idle timeout plus housekeeping delay. Capacity: with a zero minimum idle size, expected tenant connections are at most total request rate times mean retention time, whatever the tenant count (measured: 100 to 10,000); with HikariCP's default positive minimum, they grow with every provisioned tenant. Cold starts: the same retention time sets the share of requests opening a connection, 66% at 2 req/s with a 30 s timeout under long-tailed popularity. Routing each tenant to one replica beats a longer timeout: it matches the cold-start share of a fourfold timeout with a third of its connections. The model predicted every pooler-free configuration mean on minikube and Amazon EKS within 4%, measured cold-start shares within 5 points, and the tenant at which HikariCP's defaults exhaust an Amazon RDS db.t4g.medium. Proxy poolers at their defaults multiply the count. Autovacuum CPU binds next, near 1500 idle databases on RDS. We derive rules for pools, timeouts, routing and poolers.

Zenodo (CERN European Organization for Nuclear Research)
Taras Shevchenko National University of Kyiv (UA)
Advanced Database Systems and Queries
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon
Per-Tenant Connection Pools as TTL Caches: Capacity and Cold-Start Trade-offs in Database-per-Tenant PostgreSQL — Kostiantyn Dementiev · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS