Quorum Flashcards
(14 cards)
What is a quorum? What role do they play in distributed systems?
A quorum is the minimum number of servers that an application is performed on before considering that operation “successful”.
They are crucial for ensuring consistency within a distributed system.
What is the formula for determining a quorum?
A quorum should be at minimum a majority or (n/2 + 1).
When determining the number of servers what should you ensure about the number? Why is that important?
The number should be odd as it will potentially support multiple failures.
With regard to quorum, why would having 5 nodes be superior to having just 4?
In a 5-node cluster, three nodes would need to be available to have a majority (5/2+1 = 3). This means that two nodes could safely fail and still maintain availability.
With a 4-node, the majority would still require three nodes (4/2+1 = 3), meaning it could only afford a single failure.
What is the formula to achieve quorum when considering reads/writes? Why is maintaining that important
R + W > N; where
R = minimum read nodes
W = minimum write nodes
N = nodes in quorum group
This ensures that every read will see the latest written value.
Explain how the following quorum configurations would perform:
(R=2, W=2, N=3)
(R=3, W=1, N=3)
(R=1, W=3, N=3)
(R=2, W=2, N=3)
Strong consistency (as read and write nodes have quorum)
(R=3, W=1, N=3)
Fast reads, slow writes, low durability
(R=1, W=3, N=3)
Slow reads, fast writes, highly durable
How would you describe the following quorum configuration:
(R=1, W=N)
Full-replication as every node is available for writes but a single for reading which could not complete if a single node fails.
What are the two main types of quorum? What do each do?
Majority-based and Read/Write quorums.
Majority-based quorums require a majority of nodes (e.g. 3 of 5) to agree or participate in an operation.
Read/Write quorums work similar to majority but can have different quorum sizes (e.g. 3 nodes available to read, 2 nodes to write)
What are three common use cases for a quorum?
They are used in distributed databases, cluster management, and certain consensus based protocols.
How would a distributed database leverage a quorum?
A quorum would help provide consistency where multiple nodes may hold copies of the same data.
How can a quorum be used to manage a cluster? What problem can it help avoid.
Typically a cluster will be managed by an “active” group of nodes which are decided by a quorum. It avoids the “split-brain” problem where two groups of nodes each believe it is the active group.
What role can a quorum play in consensus protocols?
Some protocols, such as Paxos or Raft, can rely on a quorum to determine the result of an operation or state of the system.
What are three advantages of a quorum?
Fault-tolerance, consistency, and availability.
Fault-tolerance can allow a certain number of failures while the system is running.
Consistency is maintained as the quorum helps distribute across the nodes.
Availability allows operations to continue to complete as long as the quorum conditions are met.
What are three challenges that can involve use of a quorum?
Network partitioning, performance overhead, and complexity.
When dealing with network failures, forming a quorum can be difficult and may impact availability.
Performance can be impacted in large-clusters as quorum decisions may introduce latency.
Introducing quorums can be challenging to manage, especially in large environments with frequent node or networking changes.