Problem
In a leaderless replicated store, a write that reaches only some replicas leaves others stale. Waiting for all replicas hurts availability, while waiting for one risks reading old data. Operators need a dial between the two.
Also known as: quorum-consistency, tunable-consistency, nwr
Tune consistency and availability by requiring a configurable number of replicas to acknowledge each read and write.
In a leaderless replicated store, a write that reaches only some replicas leaves others stale. Waiting for all replicas hurts availability, while waiting for one risks reading old data. Operators need a dial between the two.
Quorum replication lets a client choose how many replicas must participate in each operation. It underlies Dynamo, Cassandra and Riak, exposing consistency levels such as ONE, QUORUM and ALL.
Pick N, W and R so that R + W > N. For N=3, W=2, R=2 any read touches at least one replica that saw the last successful write.
N=3, W=2, R=2
write k=v2: A ok, B ok, C slow -> success (2 acks)
read k: B=v2, C=v1 -> return v2 (newest version)
read repair: send v2 to C
Versions are compared using timestamps or version vectors. The coordinator returns the newest and asynchronously repairs the laggards. Common settings:
N replicas, commonly 3
Medium: repair, tuning, monitoring
Medium: reasoning about stale reads
Sloppy quorum plus hinted handoff returns stale reads
Concurrent writes resolved by clock produce lost updates
Partial write failure leaves value on fewer than W replicas but visible