CSE Roadmap

Specialist tier · about 2 hours · 5 parts

Part 3 of 5 · 1 min read

Read and write quorums

A write succeeds once enough nodes confirm it; a read succeeds once enough nodes respond and the most recent value among them is trusted.

Think of a jury requiring only a minimum number of votes before reaching a verdict, rather than requiring every single juror to agree. A decision can be reached even if a few jurors are unavailable.

In plain words: a write quorum, often written as w, is the minimum number of nodes that must confirm a write before that write is considered successful. A read quorum, often written as r, is the minimum number of nodes that must respond to a read, with the most recent value among their responses trusted as the actual current value. Choosing w and r such that their sum exceeds the total number of replicas guarantees that any write quorum and any read quorum must overlap on at least one node, ensuring a read will always see at least one node that has the latest write.

A worked example. With three total replicas, setting w to 2 and r to 2 guarantees w plus r exceeds 3, so any successful write's two confirming nodes and any read's two responding nodes must share at least one common node, ensuring the read sees the write.

The key lines. No new SQL; w and r are configuration parameters of the leaderless replication system, chosen independently for each operation or for the system as a whole.

Write quorum, read quorum

A write quorum (w) is the minimum number of nodes that must confirm a write for it to succeed; a read quorum (r) is the minimum number of nodes that must respond to a read, with the most recent response trusted.

Example: a jury needing only a minimum number of votes, not unanimous agreement, to reach a verdict mirrors a quorum's minimum-confirmation requirement.