A quorum (majority voting) refers to the minimum number of votes (or participants) required in a distributed system, database, or consensus algorithm to make a decision valid.
It ensures that even if some nodes fail or give conflicting answers, the system still reaches a consistent and reliable decision.
π In Distributed Systems (like databases, consensus, leader election):
- A quorum is the minimum number of nodes that must agree for an operation (read or write) to be considered successful.
- Typically, itβs defined as more than half of the total nodes (
βN/2β + 1). -
Example: If you have 5 nodes in a cluster:
- Quorum = 3 (majority).
- Any decision (like electing a leader or committing a write) needs at least 3 nodes agreeing.
π Why Majority Voting (Quorum) is Important:
- Consistency β Prevents two conflicting decisions from being accepted at the same time.
- Fault Tolerance β System continues to work even if some nodes fail.
- Avoids Split-Brain β Ensures only one βsideβ of the cluster makes valid decisions.
π Example in Databases:
- Write Quorum (W): Minimum nodes that must confirm a write.
- Read Quorum (R): Minimum nodes that must confirm a read.
-
Rule:
R + W > Nensures strong consistency. Example: In Cassandra with 5 replicas (N=5):- W = 3, R = 3 β guarantees overlap β consistent reads/writes.
π In short: Quorum (majority voting) = Minimum number of participants required to agree, usually a simple majority, to make a decision valid in distributed systems.