Quorums and tunable consistency
A replicated store where each read and write chooses how many of the N copies must answer. With W + R > N the sets overlap and a read meets the latest acknowledged write; smaller numbers buy latency and availability.
What it is
A quorum store keeps N copies of each key and lets the caller decide how many of them a single operation must involve: W replicas must acknowledge before a write is reported successful, and R replicas must answer before a read returns. Amazon's Dynamo paper describes the rule that makes this work: with R + W > N the system behaves like a quorum system, because any R replicas you read include at least one of the W that took the last successful write. The coordinator then compares the versions it got back: Dynamo uses vector clocks and hands concurrent versions to the client to reconcile, while Cassandra stamps each column with a timestamp and the latest one wins.
The same rule explains the cost. The more replicas an operation waits for, the more likely a slow or unreachable one holds it up, and ALL fails when any replica is down. Lower levels such as ONE or LOCAL_ONE improve throughput, latency and availability, at the price of reads that can miss a recent write: at ONE, the acknowledgment proves that one replica has the write while the others may still be catching up, so losing that node for good before they do can lose it. The arithmetic also allows lopsided pairs. R = 1 with W = N overlaps too, since an acknowledged write has reached all N replicas; it suits data that is read far more than it is written and accepts that a write fails when any replica is down. W = 1 with R = N is the mirror image.
Cassandra 5.0 turns R and W into a menu of consistency levels chosen per statement, so you don't have to know the replication factor to get an overlap. ONE, TWO and THREE wait for that many replicas; QUORUM waits for a majority, n/2 + 1; ALL waits for all of them. LOCAL_QUORUM is a majority inside the coordinator's own datacenter, EACH_QUORUM a majority in each datacenter, and LOCAL_ONE a single replica that is not fetched from a remote datacenter. ANY is accepted for writes, not reads: a stored hint counts as success, and the coordinator replays it to the replicas later. The level decides how many acknowledgments the coordinator waits for; the write itself still goes to all replicas. Reads, by contrast, are sent to just enough replicas to satisfy the level, plus an extra one when speculative retry fires because the first replicas are slow.
Some tunable stores expose a switch rather than numbers. DynamoDB offers a per-read switch instead: reads are eventually consistent by default and may not reflect a write that just completed, while setting ConsistentRead to true on GetItem, Query or Scan returns a result that includes all prior successful writes. The strongly consistent read costs twice as much as the eventually consistent one, and it is not available on a global secondary index or a stream. Global tables add a second axis: replication between Regions is eventually consistent by default, with a multi-Region strong consistency mode that replicates a change to another Region before the write returns.
Two caveats keep the overlap honest. First, hints. Dynamo's design pairs a sloppy quorum with hinted handoff so the store keeps taking writes while some replicas are unavailable, and Cassandra carries hints on its write path: at ANY, a coordinator that can't reach a replica stores a hint and replays it later. Our reading of that design: a write whose acknowledgments include a hint, or a stand-in for the missing replica, is not yet on the replicas a later read will ask, so the promise behind R + W > N returns when the hint is delivered or read repair copies the value across. Second, last-write-wins resolution depends on the clocks that stamp each write, which is why the Cassandra documentation tells operators to run time synchronization such as NTP. Clocks and ordering covers what skew does to that rule.
When to use it
Reach for a quorum store when the system must keep taking writes while some replicas are down or unreachable, and when different operations in the same table have different needs. A majority on both sides is a good default: with three replicas, one can be down and both reads and writes still succeed, and an acknowledged write is visible to the next read. Dynamo was built for shopping carts, where losing or rejecting an add-to-cart is worse than merging two versions later.
Tune per operation rather than per system. A profile edit that the same user reads back wants read and write levels that overlap. A like count or a timeline entry can take ONE or an eventually consistent read and gain throughput, latency and availability. For a cluster spread over several datacenters, LOCAL_QUORUM keeps the round trip inside one datacenter and still shows a client the latest write made from that datacenter, which is often enough for a user homed there; EACH_QUORUM is the choice when a write must be a majority in each datacenter before it counts.
When not to
When a single leader is enough, use it. A primary with replicas that reads from the primary gives read-your-writes without any quorum arithmetic, and it is easier to explain and operate; see Replication and read replicas. Quorums earn their complexity when no single node may be a point of unavailability for writes.
A quorum read and a quorum write are two separate operations, so two clients can both read a value, both see the same version and both write, and last-write-wins picks one of them by timestamp. A balance, a seat count or a unique username needs a compare-and-set or a lock, not a higher consistency level; see Optimistic and pessimistic locking and Distributed locks and leases. Likewise, nothing in R and W spans keys: a change to two rows that must land together calls for a transaction.
Don't pay for ALL or a strongly consistent read where the data tolerates lag. ALL fails as soon as one replica is unreachable, and in DynamoDB the eventually consistent read costs half as much as the strongly consistent one. If the value is a count, a feed or a cache of something that lives elsewhere, and a short lag does no harm to any decision made from it, the cheaper read is the right one.
Compared
| Setting (N = 3) | What a read sees | What it costs | When it's the right pick |
|---|---|---|---|
W = 2, R = 2 (QUORUM both ways) | The latest acknowledged write | Needs two of three replicas to answer; one down replica is tolerated | The default for data a user reads back after writing |
W = 3, R = 1 (ALL writes, ONE reads) | The latest write, from any replica | Writes fail when any replica is down | Read-heavy data with rare updates, such as a catalog |
W = 1, R = 3 (ONE writes, ALL reads) | The latest write, if all three replicas answer | Reads fail when any replica is down | Write bursts that must land fast, read rarely |
W = 1, R = 1 (ONE both ways) | Possibly an older version | Waits for a single reply each way; durability rests on one node until replication catches up | Counters, feeds, logs: anything a short lag doesn't harm |
ANY (writes) | Nothing promised until hints replay | A write succeeds with no replica up, held as a hint | Ingest that must not be rejected during an outage |
LOCAL_QUORUM per datacenter | The latest write made in the same datacenter | No cross-datacenter wait | Users homed to one datacenter who read their own writes |
DynamoDB ConsistentRead switch | Default read may lag a just-finished write; the consistent read includes all prior writes | Consistent read costs twice as much; not on a GSI | Flip it on for the read that decides something, leave it off elsewhere |
In a picture
Step 1 of 3
Write with W = 2
The coordinator sends version v2 to all three replicas. A and B acknowledge, so the write is reported successful; C is slow and still holds v1.