The Majority Quorum pattern is the mathematical foundation for strong consistency and high availability in distributed clusters. It ensures that a system can tolerate node failures without losing data or allowing conflicting updates, provided a majority of the cluster remains operational.
A distributed system consists of Ntotal nodes. To maintain strong consistency (Linearizability), the number of nodes required for a successful write (W) and the number of nodes polled for a read (R) must satisfy the following inequality:
The logic relies on the Pigeonhole Principle: if the sets of nodes used for reading and writing overlap by at least one node, that overlapping node acts as the "witness" that carries the most recent state.
We can prove thatR + W > Nguarantees that every read will see the latest write.
The selection ofRandWvalues allows architects to tune the system for specific workload profiles:
| Strategy | Configuration | Strength | Weakness |
|---|---|---|---|
| Strict Majority | W = \lfloor N/2 \rfloor + 1 R = \lfloor N/2 \rfloor + 1 | Balanced. Tolerate\approx 50\%failures. | High coordination overhead. |
| Write-Heavy | W = N R = 1 | Extremely fast reads (1 node). | A single node failure blocks all writes. |
| Read-Heavy | W = 1 R = N | Extremely fast writes (1 node). | A single node failure blocks all reads. |
For a cluster of sizeNusing strict majority (W = R = \lfloor N/2 \rfloor + 1), the number of nodes that can fail (f) while maintaining availability is:
| Cluster Size (N) | Max Failures (f) | Majority Required || :--- | :--- | :--- | | 3 | 1 | 2 | | 5 | 2 | 3 | | 7 | 3 | 4 |
Architectural Note: Distributed clusters almost always use odd numbers of nodes. Increasing from 3 to 4 nodes does not increase the fault tolerance (both can only survive 1 failure), but it increases the number of nodes that must be coordinated for a majority (from 2 to 3), actually decreasing performance.
QUORUM, LOCAL_QUORUM, ONE).