DEV Community

Saurav Jha
Saurav Jha

Posted on

Quorum and Consensus in Distributed Systems:

In distributed systems, quorum and consensus are key to ensuring consistency, availability, and fault tolerance.

Quorum: A quorum refers to the minimum number of nodes required to perform operations reliably. Typically, it is defined as the majority of nodes in a peer group. For a system with N nodes, a quorum is achieved when at least (N/2) + 1 nodes agree.

For example, in a 5-node cluster, at least 3 nodes must participate to form a quorum. If this number is not met due to node failures or network issues, the system becomes unavailable, and no new operations—such as log commits can proceed.

Consensus: Consensus is the process through which distributed nodes agree on a single, consistent state of data. It serves as the backbone for synchronization and coordination in distributed systems, ensuring that all nodes maintain the same view of shared data.

Common Use Cases of Quorum:
Distributed Databases Systems like Cassandra and DynamoDB rely on quorum-based mechanisms for consistency.

Cassandra uses the Paxos consensus algorithm to ensure that data is consistently replicated and agreed upon.

DynamoDB implements quorum-based replication to balance availability and consistency.
Learn more about Cassandra's Paxos protocol:
https://lnkd.in/gh4bnFfw

Distributed File Systems: Quorum is also crucial in file systems for ensuring consistent file operations across nodes.
Google’s Chubby lock service, which supports the Google File System (GFS), uses the Paxos consensus algorithm to maintain high availability and consistency.
Worth reading the paper on Google’s File System
https://lnkd.in/gdHwFN9r

*Popular Consensus Algorithms*
Raft
Paxos
PBFT (Practical Byzantine Fault Tolerance)
In-depth overview of the Raft algorithm
https://lnkd.in/gB4u43mi

Top comments (0)