Skip to content

17 · Quorum Consensus — Majority Agreement for Operations

Distributed Transactions · Topic 17 of 20


What is a Quorum?

In a distributed system with N replicas, a quorum is the minimum number of nodes that must agree for an operation to succeed.

W + R > N guarantees read/write set intersection for a fixed set of N replicas—not linearizability by itself.

Where:

  • N = replication factor (total replicas)
  • W = write quorum (nodes that must acknowledge a write)
  • R = read quorum (nodes that must respond to a read)

Quorum Configurations

Config W R N Trade-off
Overlapping read/write quorums 2 2 3 Intersection; needs correct version reconciliation and concurrency handling
Write-heavy 1 3 3 Fast writes, slow reads
Read-heavy 3 1 3 Fast reads, slow writes
Eventual 1 1 3 Fastest, stale reads possible

How Quorum Prevents Stale Reads

graph LR
    Client -->|Write W=2| N1["Node 1 ✅"]
    Client -->|Write W=2| N2["Node 2 ✅"]
    N3["Node 3 ❌ (missed write)"]

    Client2 -->|Read R=2| N2["Node 2 ✅ (latest)"]
    Client2 -->|Read R=2| N3["Node 3 (stale)"]
    N2 -->|"Returns latest (wins)"| Client2

With fixed membership, at least one node in the read quorum participated in the completed write quorum. Choosing the correct returned version additionally depends on reconciliation and concurrent/failed-write semantics.


Cloud Implementations

  • ConsistencyLevel set per query
  • ONE: W=1, R=1 — fastest, eventual
  • QUORUM: each operation waits for floor(N/2)+1 replicas; read/write quorums overlap
  • ALL: each operation waits for all replicas; lower availability, not a replacement for linearizable LWT
    session.execute(query, consistency_level=ConsistencyLevel.QUORUM)
    
  • Replication is managed internally; the API does not expose R and W knobs
  • ConsistentRead: true requests the documented strong-read contract on tables and LSIs
  • ConsistentRead: false permits stale reads; GSIs do not support strong reads
  • Paxos consensus across 2f+1 replicas (tolerates f failures)
  • Writes coordinate through split leaders; read-only snapshots can be served by replicas with a sufficiently advanced safe timestamp
  • writeConcern: { w: "majority" } — write acknowledged by majority
  • readConcern: "majority" — read only committed-by-majority data

Quorum Arithmetic Is Not a Consensus Protocol

With N=3, a write to {A,B} and read from {B,C} overlap at B. For a completed write with no conflicting concurrent write, correct reconciliation can return its value. But concurrent writes, clock-based last-writer-wins, failed/partial writes, sloppy quorums and membership changes require additional reasoning. Write/write intersection also needs 2W > N when the algorithm relies on it.

Raft and Paxos use intersecting majorities plus protocol rules for leader/term selection, log ordering and recovery. They agree on a decision history; merely counting read/write responses does not reproduce those guarantees. In Cassandra, quorum reads/writes are not a substitute for lightweight transactions when linearizable conditional updates are required.

MongoDB readConcern: "majority" means reading majority-committed data, not necessarily the newest real-time value. Match the read concern, write concern and session semantics to the required invariant.

Check Your Understanding

#

Question 1

With N=3, R=1 and W=3, what happens after one replica fails?

#

Question 2

Does a failed quorum write mean no replicas changed?

Source: Spanner read/write protocol.