We scaled PgBouncer to 4x throughput - AllTheNews.today

We scaled PgBouncer to 4x throughput

ClickHouse Managed Postgres scaled PgBouncer's throughput by 4x by running multiple PgBouncer processes (one per CPU core) instead of a single process, with the kernel load-balancing connections across them using SO_REUSEPORT. The main challenge was handling query cancellations, which they solved through process peering to forward cancels to the correct process when they arrive at the wrong one. Testing on identical 16-vCPU instances showed the multi-process fleet achieved 336k transactions/sec compared to 87k for a single process.
Read Full Article →
clickhouse.com
← Back to Latest