Try
↑ ↓ move↵ openesc close
Quorums1 / 7
In this lesson · topic 1 of 7
  1. 1. What if there is no leader
  2. 2. Overlap, and the k-th fastest reply
  3. 3. Tune R and W against slow and dead replicas
  4. 4. What R plus W above N still does not promise
  5. 5. Two writes at once, and which one wins
  6. 6. Merkle trees, expiring hints, and deleted data coming back
  7. 7. Check the quorum arithmetic

Topic 1

What if there is no leader

4 min read

The leader is a bottleneck and a risk

In the last lesson every write went through one leader. If it fails, writes stop until a new one is chosen. If it is slow, everything is slow. Some stores avoid this by having no leader. A client, or any node acting for it, sends the write to several replicas directly.

That raises a question. Replicas can be down, slow, or unreachable on any given request. If the write has to reach all of them, a single bad replica blocks it. If it only has to reach one, the others may miss it, and a read that lands on a replica that missed the write returns old data.

Two dials

Say there are N replicas of each item. A write is declared successful once W replicas have acknowledged it. A read asks R replicas and takes the newest answer. W and R are the two dials.

Turn them low and the system is fast and always available, but reads can miss writes. Turn them high and reads are reliable, but one slow or dead replica stops operations. The question is where to set them, and whether there is a rule that tells you when a read is guaranteed to see the last write.

Predict first

Five replicas. Writes wait for 1 acknowledgement and reads ask 1 replica. All replicas are healthy. Roughly how often does a read return something older than the newest acknowledged write?

In the lab’s simulation, with W and R both set to one and no failures at all, 5.5%measured of reads were stale.

A rule for the dials

There is a rule for choosing W and R so that a read is guaranteed to see an acknowledged write. It goes back to 1979. The next topic derives it and shows what it costs in latency and availability.

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