Partitioning, Sharding & Zero-Downtime Migration

Split data without splitting your team: shard keys, hot shards, cross-shard queries, resharding with logical shards, and moving a live table with no downtime.

About 95 minutes · 15 exam questions · 9 interview questions · 2 code labs

What you will learn

  1. Why split data at all — and why sharding comes last
  2. Native table partitioning in PostgreSQL (the step before sharding)
  3. Sharding strategies: hash, range, directory, geo
  4. Choosing the shard key — the decision you cannot cheaply undo
  5. Hot shards and the celebrity problem
  6. Cross-shard queries, joins and global secondary indexes
  7. Resharding: consistent hashing, logical shards, Vitess and Citus
  8. Federation (functional partitioning) and cells
  9. Zero-downtime data migration: dual writes vs CDC, shadow reads, cutover
  10. Generating IDs across shards: Snowflake and friends

Previous: Replication, Read Replicas & Replication Lag · Next: Database Firefighting: Six Production Scenarios