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.
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.
- 01Contrast synchronous and asynchronous replication, and explain how a failover loses acknowledged writes.
- 02What is read-your-writes, and how do you preserve it under replication lag?
- 03Why does an even key count still create a hot shard, and how do you mitigate it?
- 04Why does hash(key) mod N doom a reshard, and how does a hash ring fix it (with virtual nodes)?
- 05State the quorum inequality and contrast CAP with PACELC.
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.