Course contentsShow
← Computer Science
Lesson 2620 of 2,87258. Distributed Systems BasicsFree lesson

Quorum-Based Consistency

Study how read and write quorums provide tunable consistency guarantees in replicated systems.

Quorum-Based Consistency

What You'll Learn

You'll learn how quorum-based systems let you tune the trade-off between consistency and availability by requiring a minimum number of replicas to agree on reads and writes.

The Core Idea

In replicated distributed systems, you often store the same data on multiple nodes. But how many nodes need to participate in a read or write operation? Quorum-based consistency gives you a flexible answer.

A quorum is the minimum number of nodes that must agree for an operation to succeed. You define two key parameters:

  • W (write quorum): How many replicas must acknowledge a write before it's considered successful
  • R (read quorum): How many replicas must participate in a read

The magic happens when R + W > N (where N is the total number of replicas). This overlap guarantees that reads will see the most recent write because at least one node in the read quorum must have participated in the latest write.

The Trade-offs

Different quorum configurations give you different consistency guarantees:

  • Strong consistency: W = N, R = 1 or W = 1, R = N (one operation waits for all replicas)
  • Balanced approach: W = R = (N/2) + 1 (majority quorum)
  • High availability: Lower quorums mean operations can succeed even when nodes fail
  • Weaker consistency: If R + W ≤ N, you get eventual consistency with better availability

Analogy

Think of a committee of 5 people voting on decisions. If you require 3 votes to pass a motion (write) and consult 3 people when checking what passed (read), you're guaranteed at least one person knows the latest decision. Lower those numbers to 2 each, and you might miss recent changes.

Key Takeaway: Quorum-based consistency lets you dial consistency up or down by adjusting read and write quorum sizes, trading off between strong guarantees and system availability.