Try
↑ ↓ move↵ openesc close

Curriculum · Module 02, Databases and Replication

Lesson 2 · 7 topics · 40 min · Intermediate · 0/7 done

Quorums

With no leader, a write goes to W replicas and a read asks R. The rule R + W > N makes them overlap, and every choice of R and W trades latency, freshness and availability.

What each topic covers

  • A leader is a single point of failure for writes. Without one, every replica can take any write, and nobody is sure which copy is newest.
  • If R plus W exceeds N, every read set shares a replica with every acknowledged write set. The price is waiting for the k-th fastest replica.
  • Set R and W, make replicas slow or unreachable, and watch stale reads, latency and accepted writes move.
  • Measured staleness, k-th reply latency, availability, sloppy quorums and read repair, and the limits of a quorum.
  • Last-write-wins silently drops one of two concurrent writes. Version vectors detect the clash and keep both. A shopping cart worked through both ways.
  • How a leaderless store finds the few keys that differ between replicas, why hints are only kept for hours, and how a delete can undo itself.
  • Three quick checks on picking R and W, slow replicas and sloppy quorums, plus the papers behind the lesson.

Topics

  1. 1What if there is no leader4 min
  2. 2Overlap, and the k-th fastest reply6 min
  3. 3Tune R and W against slow and dead replicas8 min
  4. 4What R plus W above N still does not promise6 min
  5. 5Two writes at once, and which one wins6 min
  6. 6Merkle trees, expiring hints, and deleted data coming back6 min
  7. 7Check the quorum arithmetic4 min

Practise this lesson

13 interview questions on quorums, with worked answers and sources.

Practise these

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms