How We Scaled PgBouncer to 4x Throughput in ClickHouse Managed Postgres

We scaled PgBouncer to 4x throughput

39saisrirampur💬 3
How We Scaled PgBouncer to 4x Throughput in ClickHouse Managed Postgres

We discovered that a single PgBouncer process wastes most CPU cores, capping performance. By running a fleet of processes using so_reuseport and peering, we achieved four times the throughput. This setup ensures every core works, handling cancellations correctly and splitting connection budgets to prevent bottlenecks in ClickHouse Managed Postgres.

"On a box you're paying 16 vCPUs for, a single PgBouncer leaves almost all of it on the floor."

More from this day · 2026-07-11