Loading lesson…
Level 1 · Apprentice0 XP
Why connections are expensive, how to size pools, and when to add PgBouncer.
Step 1 / 6
ProblemThe team scales an API from 4 to 40 pods to handle a sale. Each pod opens 20 connections. The database now juggles 800 connections, spends its time switching, and gets slower.
← → step
Before this: Concurrency: MVCC, locks and deadlocks
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Load-test an API with pool sizes 2, 5, 10 and 50 per instance and plot throughput and p99 latency. Then put PgBouncer in transaction mode in front and repeat with 20 instances.