Back to roadmap
Module 3 · Consistency & ReplicationDay 02525 min

Quorums and R+W>N

Tune consistency vs availability per operation.

Day 025

Quorums and R+W>N

N1
datastore
N2
datastore
N3
datastore
Signal path
Quorum: R+W > N
N1
datastore
async
N2
datastore
N2
datastore
async
N3
datastore
Memory hook

Quorums and R+W>N: tune consistency vs availability per operation

Mental model

choose the failure mode you can explain

Design lens

Lower R/W → more availability, less consistency.

Recall anchors
N — replicasW — write acksR — read responses

Why it matters

Quorum stores (Dynamo-style) replicate to N nodes and let you pick how many must respond for reads (R) and writes (W). R+W>N guarantees you read at least one node that saw the latest write.

Deep dive

Common: N=3, R=2, W=2 — balanced. Any one node down, still works.

Strong-read leaning: N=3, R=3, W=1 — fast writes, slow reads, fragile reads.

Strong-write leaning: N=3, R=1, W=3 — fast reads, fragile writes.

Tunable per-op: critical operations W=ALL; cosmetic R=1.

Demo / scenario

Cassandra cluster with N=3.

  1. User profile write at QUORUM (W=2): tolerate one node down.
  2. Profile read at QUORUM (R=2): see latest committed.
  3. Like-count write at ONE (W=1): cheap, possibly lost on failure.
  4. Mix per-op based on importance.

Tradeoffs

  • Lower R/W → more availability, less consistency.
  • Higher R/W → opposite.
  • ALL is fragile if any node is slow.

Diagram

N1
N2
N3
Quorum: R+W > N.

Mind map

Check yourself

Loading quiz…

Sources & further reading