Try
↑ ↓ move↵ openesc close

Interview prep / Quorums

Junior · Quorums · System design interview question

Why does R + W > N mean a read sees the latest acknowledged write?

Sketch your own answer first, then compare it with the one below.

A strong answer

A write is acknowledged by W replicas, so W replicas hold the new value. A read asks R replicas. If R plus W is greater than N, the two groups cannot be completely separate, since together they would need more than N different replicas. So at least one replica in the read group has the new value.

The reader compares the versions it receives and returns the newest, so that overlapping replica makes the read see the write. This is the argument from Gifford's weighted voting paper.

The guarantee has limits. It holds only for reads that start after the write was acknowledged, and only with strict quorums. If R plus W equals N exactly, the two groups can be disjoint and a read can miss the write.

Sources

Learn it by running it

The quorums lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

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