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 \implies \text{strong consistency}\]

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
Strong consistency 2 2 3 Slower, no stale reads
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

At least one node in the read quorum must have the latest write.


Cloud Implementations

  • ConsistencyLevel set per query
  • ONE: W=1, R=1 — fastest, eventual
  • QUORUM: W=N/2+1, R=N/2+1 — strong
  • ALL: W=N, R=N — strongest, lowest availability
    session.execute(query, consistency_level=ConsistencyLevel.QUORUM)
    
  • Write always goes to all replicas in region (managed internally)
  • ConsistentRead: true — equivalent to quorum read (R=majority)
  • ConsistentRead: false (default) — R=1, may read stale
  • Paxos consensus across 2f+1 replicas (tolerates f failures)
  • All reads and writes go through Paxos leader — effectively W=N/2+1, R=1 (from leader)
  • writeConcern: { w: "majority" } — write acknowledged by majority
  • readConcern: "majority" — read only committed-by-majority data