senior loop
Deep Dives/Replication & Partitioning

Replication & Partitioning

Copying data survives failure and scales reads. Splitting data scales writes and storage. Two different answers to two different problems, and confusing them is expensive.

FundamentalsDistributed Systems~12 min · 6 sections

Prerequisites: Databases 101 — transactions and indexes.

Cover these firstDatabases 101

After this: Separate the two concerns and explain what each one costs on the read and write path.

Suggested first pass: Read sections 1–5, answer each section in your own words, then use the remaining failure modes and exercises as the advanced pass.

ReplicationPartitioning (sharding)
What it doesSame data on several machinesDifferent data on different machines
Read capacityyesyes
Write capacitynoyes
Storage beyond one boxnoyes
Survives a node lossyesno

Every replica applies every write, which is why replication never adds write throughput. Every partition holds one copy of its slice, which is why partitioning never adds durability. Real systems do both: partition the data, then replicate each partition.

Name the problem before the mechanism. "We need more write throughput, so partition" and "we need to survive a node loss, so replicate" are different sentences, and swapping them is the mistake.

Next deep dive
Consistency Models & CAP
~12 min