Postgres Sharding: Complete Hands-On with Docker and Python https://WebToolTip.com Published 10/2026
Created by Roni Das
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz, 2 Ch
Level: Intermediate | Genre: eLearning | Language: English | Duration: 16 Lectures ( 2h 34m ) | Size: 1.2 GB
Build an orders database, load it until it breaks, shard it yourself, add PgBouncer and Citus, and measure every step
What you'll learn
⚡ Decide when a slow PostgreSQL database needs sharding, and when an index, a cache, a replica or partitioning is enough
⚡ Choose a shard key from real queries, and measure how evenly it spreads the data
⚡ Write a shard router in Python and move a million customers and 8.5 million orders into four shards
⚡ Load test a database with 64 concurrent checkout servers and read throughput and p95 latency correctly
⚡ Fix the classic sharding problems: fan-out queries, hot rows, connection limits and adding a shard
⚡ Put PgBouncer in front of each shard in transaction mode, and know what it costs
⚡ Use consistent hashing and logical buckets so adding a shard moves about a fifth of the data, not four fifths
⚡ Shard PostgreSQL with Citus: distributed tables, co-location, Task Count and live rebalancing
⚡ Answer "how would you shard an orders database?" in a system design interview, with real numbers
Requirements
❗ A laptop with Docker Desktop installed and running (Mac, or Windows with WSL 2), about 8 GB of memory for Docker and 10 GB of free disk
❗ VS Code, or any code editor you like
❗ Basic comfort with a terminal. You do not need to install Python: every file runs inside a container
❗ Some SQL helps, but every statement is explained as we write it