
Postgres Sharding: Complete Hands-On (PgBouncer + Citus)
Load one PostgreSQL until it breaks, shard it yourself with a router you write, then add PgBouncer and Citus. Every number measured live.
chapter list
- 0:000Teaser: what we will buildfree
- 1:181What sharding is, why and when you need it, and what it costsfree
- 7:062How enterprises run a databasefree
- 13:113Meet KiranaLoop: build the orders databasefree
- 14:443aBefore you start: Docker Desktop, VS Code, the code
- 19:123bIs PostgreSQL running? psql and pgAdmin
- 24:593cThe app container and the first tables
- 40:064Measure it: orders per second, p95, the slow second
- 1:01:145Climb the ladder: a replica, and partitioning by month
- 1:12:126Choose the shard key from the queries
- 1:19:297Four ways to split the data
- 1:21:158Four shards and a router
- 1:38:429The dashboard that asks every shard
- 1:45:0210The 9 pm flash sale
- 1:56:4211Too many connections, and the pool that fixes it
- 2:05:0212A fifth shard: the belt, the ring road, and buckets
- 2:14:3013What sharding makes hard
- 2:17:1914The enterprise way: Citus, and how others do it
- 2:31:4015Should you shard? The checklist and the interview answer
- 2:34:3415aClean up your laptop
Free: chapters 0, 1, 2, 3. The rest come with the System Design course.