← Lessons

quiz vs the machine

Gold1500

System Design

Quorum Reads And Writes

Tuning how many replicas must answer to balance consistency against availability.

5 min read · core · beat Gold to climb

The quorum rule

In a replicated store with N copies of each key, a quorum controls how many replicas must respond. A write must reach W replicas before it is acknowledged, and a read must hear from R replicas before it returns.

The key relationship is that when R plus W is greater than N, every read overlaps at least one replica that saw the latest write. That overlap is what gives you a strong chance of reading current data.

Tuning the knobs

  • High W makes writes durable but slower and less available.
  • High R makes reads safer but slower.
  • Lowering both improves availability but risks stale reads.

A common balanced choice sets W and R each to a majority of N, so any read and any write must overlap.

Because reads may touch multiple replicas with different versions, the client picks the newest using version metadata such as a vector clock.

Key idea

Choosing R and W so their sum exceeds N forces read and write sets to overlap, trading availability for fresher reads.

Check yourself

Answer to earn rating on the learn ladder.

1. When does a quorum guarantee that a read overlaps the latest write?

2. What is the cost of lowering both R and W?