Skip to main content
PreparationZone Logo
PrepZone

Quorums, Read/Write Concerns, and SLAs

W + R > N for strong reads, tunable concerns, and mapping quorum math to customer SLAs.

Pass checkpoint below

Why this matters

  • Dynamo-style quorums appear in Cassandra, Riak, DynamoDB, and custom ShardPay storage paths.
  • Interviewers ask you to derive W, R, N for a given durability and latency SLA — show the math.
  • SLA targets (RPO, RTO, read staleness) should drive quorum configuration, not framework defaults.
  • Misconfigured quorums cause "sometimes stale, sometimes lost" behavior that is hardest to debug.
Replica 1Write
Replica 2Write
Replica 3Stale

N=3, W=2, R=2 → strong read after quorum write

W + R > N guarantees overlap — a read sees the latest write.

Quorum configuration

ShardPay runs N=5 replicas per ledger shard. W=3 on write ensures any commit is on a majority before ack. R=2 on read with W+R>5 guarantees the read set overlaps the write set — a reader always contacts at least one node that participated in the latest commit.

This configuration trades extra write latency (3 round-trips) for read speed (2 nodes) while preserving read-after-write correctness for quorum reads.

Core parameters

  • N (replication factor) — Total copies of each key or shard range. ShardPay uses N=5 in production for ledger shards — survives loss of any two replicas without data loss if W uses a majority.
  • W (write quorum) — Minimum replicas that must acknowledge a write before success. ShardPay sets W=3 so a committed transfer survives any two simultaneous replica failures.
  • R (read quorum) — Minimum replicas consulted on read. ShardPay uses R=2 for standard balance reads when paired with W=3 — satisfies W+R>N overlap property.
  • W + R > N — Guarantees read and write quorums intersect, so a read sees the latest committed write. ShardPay's fraud pipeline uses this overlap; analytics uses R=1 (no overlap guarantee) with explicit staleness acceptance.
  • Sloppy quorum / hinted handoff — Writes accepted by fallback nodes when primary replicas are down, returned later. ShardPay disables sloppy quorum on the ledger — financial data does not use hinted handoff.

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 2 sections

  • Deriving W and R from SLAs
  • SLA mapping and operational trade-offs

Test yourself

Answer these before moving on — recall is what makes it stick.