Consistency as a Dial
Some distributed stores let you choose, per operation, how many replicas must confirm a read or write. With N replicas holding each key, you pick a write count W and a read count R. This makes consistency a dial rather than a fixed property.
The Quorum Rule
- If W plus R is greater than N, the read set and the write set must overlap on at least one replica, so a read is guaranteed to see the latest acknowledged write. This is a quorum.
- Choosing high W and R favors consistency at the cost of latency and availability.
- Choosing low W and R favors speed and availability at the cost of possible staleness.
Common Settings
- A read and write both requiring a majority gives strong guarantees.
- W equal to one means a write returns after a single replica acknowledges, which is fast but risky.
- R equal to one returns from the first replica to answer, which may be stale.
Why This Helps
Different operations have different needs. A financial update can demand a quorum while a view counter can accept a fast loose read, all in the same database.
Key idea
Tunable consistency lets each request pick how many replicas must respond, and when W plus R exceeds N a quorum guarantees reads see the latest write.