open atlas
↑ Back to track
System Design Foundations SD · 04 · 06

Data distribution: free-recall review

Free-recall prompts across the data-distribution unit. Answer each in your own words first — replication modes, the hot shard, the hash ring, the quorum inequality, CAP and PACELC — then reveal the model answer and compare.

SD Senior ◷ 14 min
Level
FoundationsJuniorMiddleSenior

Retrieval beats re-reading. For each prompt, say or write a full answer from memory — including the inequality and the failure mode — before you open the model answer. The effort of reconstruction is what makes replication lag, the hash ring, and PACELC stick.

Reconstruct the unit’s spine without looking back: why every copy lags and how a failover loses writes, why an even key count still hot-spots, why mod-N dooms a reshard and a ring fixes it, what the quorum inequality guarantees, and how CAP and PACELC differ.

Recall before you leave
  1. 01
    Contrast synchronous and asynchronous replication, and explain how a failover loses acknowledged writes.
  2. 02
    What is read-your-writes, and how do you preserve it under replication lag?
  3. 03
    Why does an even key count still create a hot shard, and how do you mitigate it?
  4. 04
    Why does hash(key) mod N doom a reshard, and how does a hash ring fix it (with virtual nodes)?
  5. 05
    State the quorum inequality and contrast CAP with PACELC.
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: replication copies data for reads and survival, but async replication acks before durability so a failover loses acknowledged writes (keep a synchronous replica; route a user’s own reads to a current node for read-your-writes). Sharding by a partition key still produces a hot shard under skew, because even key counts aren’t even load — split, cache, or isolate the celebrity key. Consistent hashing rings nodes and keys so adding one moves only ~1/N (virtual nodes balance the arcs and spread failure), where mod N would remap nearly all and wipe a cache. Quorums guarantee a fresh read when R + W > N. And CAP is only the partition-time C-vs-A choice while PACELC adds the everyday latency-vs-consistency trade — so you pick per use case across the linearizable→eventual spectrum. The thread tying them together: at this depth, distribution is a deliberate choice of which inconsistency is acceptable for each piece of data, not a behavior you discover in production.

Something unclear?

Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.

shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.