← Lessons

quiz vs the machine

Platinum1790

System Design

Quorum for Storage

Tuning how many replicas must agree to balance consistency and availability.

6 min read · advanced · beat Platinum to climb

Voting among replicas

A quorum is the minimum number of replicas that must respond for an operation to count. With N replicas, a write must reach W of them and a read must consult R of them. Tuning W and R controls the tradeoff between consistency, latency, and availability.

The overlap rule

If W plus R is greater than N, every read set overlaps every write set by at least one replica, so a read is guaranteed to see the latest acknowledged write. This is strong quorum consistency. If the sum is not greater than N, reads may miss recent writes, giving weaker guarantees but lower latency.

Common configurations

  • W equals N, R equals one makes reads fast but writes fragile to any node being down.
  • W equals one, R equals N does the reverse.
  • A balanced setting like W and R each just over half of N keeps both reasonable while preserving overlap.

Availability tradeoff

Lower quorums tolerate more failed replicas because fewer must respond, raising availability. The cost is a weaker freshness guarantee. The right point depends on whether the workload prizes consistency or uptime.

Key idea

A quorum requires W replicas for writes and R for reads, and when W plus R exceeds N every read overlaps the latest write, letting you tune consistency against availability by choosing where the overlap line sits.

Check yourself

Answer to earn rating on the learn ladder.

1. What does the condition W plus R greater than N guarantee?

2. Why might a system choose a lower quorum?

3. With W equals N and R equals one, what is the main weakness?