Article may be outdated

This article is 52 days old. Some details may have changed since publication.

Hacker News·5 min read·hard

We scaled PgBouncer to 4x throughput

S
saisrirampur
We scaled PgBouncer to 4x throughput
AI Summary

Engineers at ClickHouse improved PgBouncer throughput by 4x by moving from a single-threaded process to a multi-process fleet architecture. They utilized so_reuseport to distribute connections across CPU cores while implementing peering to handle query cancellations correctly.

Why it matters

Optimizing database connection pooling is critical for scaling high-performance web applications and managing infrastructure costs effectively.

Dive DeeperCreate a free account to unlock

PgBouncer is single-threaded. A single process uses one CPU core, no matter how many the machine has. On a 16-vCPU box that means one core does all the connection pooling while the other fifteen sit idle, and the pooler starts capping throughput long before Postgres runs out of room.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technologybusiness
Political Bias
Center
LeftLean LCenterLean RRight
Confidence: 95%

The content is a technical engineering case study with no political or social bias.

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in