We scaled PgBouncer to 4x throughput
Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.
Detailed scaling of PgBouncer, directly applicable to PostgreSQL infrastructure.
PgBouncer's single-threaded architecture limits it to one CPU core, capping throughput well before Postgres saturates. ClickHouse Managed Postgres deploys multiple PgBouncer processes on the same port via SO_REUSEPORT, letting the kernel load-balance connections across cores, and adds process peering to forward query cancellation requests to the correct owner. In benchmarks on a 16-vCPU instance, the 16-process fleet achieved 336k transactions/sec (4x the single-process peak of 87k) while using only 8 cores, leaving headroom before Postgres became the bottleneck.