A quorum in distributed databases is a mechanism used to maintain consistency across replicated data nodes. When data is stored on multiple servers (replicas), a quorum ensures that read and write operations meet a minimum agreement threshold before being considered successful. This prevents conflicts and guarantees that clients always see the most recent data, even if some replicas are temporarily unavailable. Quorums are essential in systems where availability and consistency must be balanced, such as in distributed databases like Apache Cassandra or Amazon DynamoDB.
Quorums work by defining two values: a write quorum (W) and a read quorum ®. For example, in a 3-node cluster, a common configuration is W=2 and R=2. When writing data, the system waits for acknowledgment from at least 2 nodes before confirming the write. For reads, it fetches data from 2 nodes and returns the most recent version. The key rule is that W + R > N (where N is the total replicas). This ensures at least one node in the read quorum overlaps with the write quorum, guaranteeing consistency. If W=1 and R=1 in a 3-node system (violating W+R>N), a read might fetch stale data if it hits a node that hasn’t received the latest write.
The choice of quorum values involves trade-offs. Higher write quorums (e.g., W=3 in a 3-node system) improve consistency but reduce availability—if one node is down, writes will fail. Lower quorums improve availability but risk temporary inconsistencies. For example, a system prioritizing availability might use W=1, R=1, accepting that some reads might be stale but staying operational during outages. In practice, many systems use dynamic quorums, adjusting W and R based on network conditions or workload. For instance, Cassandra allows tuning consistency levels per operation, letting developers choose between strong consistency (QUORUM) or eventual consistency (ONE). This flexibility makes quorum systems adaptable but requires careful configuration to match application needs.
Zilliz Cloud is a managed vector database built on Milvus perfect for building GenAI applications.
Try FreeLike the article? Spread the word