Hayk Simonyan on YouTube · Open on YouTube
System design and architecture · Proficient · Lesson 62 of 98 · 7 min video, then about 6 hours of practice
Data at scale: replication, partitioning and choosing a store
After this you can explain replication and sharding, their costs, and when a relational database stops being enough.
Why it matters
The database is usually the hardest part to scale, because it holds state. Read replicas spread read load at the cost of replication lag. Sharding spreads writes at the cost of cross-shard queries and operational complexity. Different stores (document, key-value, column, search) solve specific problems. Focus on the costs. Most teams shard too early or pick a NoSQL store for the wrong reasons. Trap: 'Postgres won't scale.' It scales a long way, and the alternatives carry real costs.
How to use this resource
Replication and sharding explained clearly in seven minutes.