Skip to content
StackDecode
System Design
5. Advanced Database ArchitectureAnimated

Quorum-Based Replication

Read and write quorums that overlap.

The idea

With N replicas, writing W and reading R where W + R is greater than N guarantees overlap.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

node 1value v1node 2value v1node 3value v1node 4value v1node 5value v1
  • latest
  • stale

5 replicas each hold the value v1. We choose W=3 (acks needed to write) and R=3 (replies needed to read).

N:
5
W:
3
R:
3
1/4

Change N, W and R to see when reads can be stale.

Step by step

  1. 1Write to W replicas
  2. 2Read from R replicas
  3. 3Take the newest version
  4. 4Overlap ensures freshness

Where it is used

Dynamo, Cassandra.

Watch out for

Sloppy quorums weaken the guarantee.

Related