A million clients, four hundred connections
How production systems ration a small budget of database connections among thousands to millions of clients: pool sizing, pooler topology, pooling-mode semantics, and the published failure record.
Reconstructs the two-line connection-rationing architecture that GitLab, Notion, Figma, OpenAI, Cloudflare and Supabase all converge on, with the measured cost of idle connections, the ceilings of a single-threaded pooler, and five published incidents. A reader leaves able to size each pool, choose a pooling mode with its semantic consequences in view, and capacity-plan the pooler tier as a first-class service.
The mature deployments no longer engineer connection reuse at the pool; they engineer admission control there, because the pool is the one chokepoint every query passes through, and Figma credits that shift with preventing more than 20 incidents in a single quarter.
What you get out of it
- Idle connections are not free: one active query slows more than 2x among 10,000 idle connections (Freund, 2020), and 1,000 idle connections cut read throughput 46% on a small RDS instance (AWS, 2020).
- Every published large deployment converges on two ration lines: a small in-process pool sized to the database host, and a transaction-mode pooler tier holding the idle clients.
- The pooler is itself a capacity-planned service: one core and roughly a thousand active clients per process; GitLab, ClickHouse and Crunchy all scale it as a per-core process fleet.
- Changing pool mode is an application-semantics migration: prepared statements and session SET maroon on server connections, a failure class that ran from 2017 driver issues until PgBouncer 1.21 in late 2023.
- Storms and recovery herds are open-loop failures; the bounded pool is the stability mechanism, and recovery needs a deliberate admission ramp (Honeycomb 2023, Quay.io 2020).
Scope
Why this, now. Figma's 2026 PGKeeper account and OpenAI's 2026 Postgres write-up both moved the frontier of this topic from connection reuse to pool-level admission control, which changes what teams should build at the pool.
What it does not cover. Read-replica routing policy, sharding, driver-internal retry semantics, and serverless engines that dissolve the connection limit inside the managed service.
Other field guides
The disks never disappear: what "diskless" systems actually delete
Reconstructs the zero-disk pattern across nine production systems (WarpStream, Kafka's KIP-1150, Confluent Freight, Neon, turbopuffer, Datadog Husky,…
24 sources · 20 organisations · 4 postmortemsThe cutover is the easy part
A field guide to online resharding, reconstructed from thirteen production accounts (Notion, Figma, Slack, GitHub, Shopify, Discord, Etsy, Pinterest,…
34 sources · 23 organisations · 5 postmortemsTime cannot go backwards, and other lies production believed
Two postmortems (Cloudflare 2017, Azure leap day 2012), three Linux kernel commits, the Go and Rust standard-library design records, Kubernetes leade…
23 sources · 14 organisations · 2 postmortems