#PostgreSQL

ClickHouse scales PgBouncer to 4x throughput

clickhouse.com · ⭐️ 8/10 · 2026-07-11

8/10

ClickHouse published a blog post describing how they scaled PgBouncer, a popular PostgreSQL connection pooler, to 4x its original throughput by enabling SOREUSEPORT and implementing peering between processes. PgBouncer is widely used in PostgreSQL deployments, and this performance improvement benefits many users who rely on it for connection pooling. The techniques used can inspire similar optimizations in other network services. SOREUSEPORT allows multiple processes to bind to the same TCP port, distributing incoming connections evenly. Peering forwards cancellation requests to the correct process, eliminating bottlenecks and improving scalability.