Skip to content

We scaled PgBouncer to 4x throughput

7.9 relevance
Score Breakdown
technical depth
9
novelty
7
actionability
8
community
7
strategic
6
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Detailed scaling of PgBouncer, directly applicable to PostgreSQL infrastructure.

DevTools clickhouse.com
We scaled PgBouncer to 4x throughput
Summary

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.

Author

Kaushik Iska

More from Kaushik Iska →