Try
↑ ↓ move↵ openesc close

Interview prep / Quorums

Senior · Quorums · System design interview question

Even with R + W > N, a quorum store can return surprising results. Give cases and explain what it would take to remove them.

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

A strong answer

R plus W above N guarantees that a read sees writes acknowledged before it started. It does not make the store behave like one machine. Several cases break that picture.

A read concurrent with a write may return either value, and two reads in a row can return new then old if the write is only partly applied. A write that reaches fewer than W replicas is reported as failed but is not rolled back, so a later read can return it. A sloppy quorum gives the overlap up. If versions are timestamps from unsynchronised clocks, a later write can lose to an earlier one. Concurrent writes to the same key need a policy, such as last write wins, which silently drops one, or version vectors that keep both.

Removing these takes more machinery: a consensus protocol to order writes, or read repair that runs before a read returns, or client-side merge logic. The honest summary is that quorums are tunable and cheap, and they buy bounded staleness in the common case, not a single global order.

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