| We scaled PgBouncer to 4x throughput(clickhouse.com) | |
| 213 points by saisrirampur 21 hours ago | 52 comments | |
tl;dr: ClickHouse scaled PgBouncer 4x (from ~87k to ~336k TPS on a 16-vCPU box) by running a fleet of PgBouncer processes sharing one port via SO_REUSEPORT, since PgBouncer is single-threaded and otherwise pins to one core. To make this work correctly, they use peering to forward Postgres cancel requests to the process owning the session, and divide connection limits (max_client_conn, max_db_connections) across the fleet to avoid oversubscribing Postgres. | |
HN Discussion:
| |