Phase 9Advanced10 of 18 in Database Design
Replication, Partitioning and Sharding
Primary/replica replication, lag and read-your-writes, failover and split brain; range, list, hash and time partitioning with pruning and retention; shard keys, resharding, cross-shard queries and hotspot mitigation.
Scale in the cheapest order: tune queries and indexes, add cache and read replicas, partition big tables, and shard only when a single primary can't handle the writes or the data. Each step adds operational cost and new failure modes.
0/5 · 0%
5 topics ~43 min 7 code blocks & diagrams