Quorum Flashcards

(14 cards)

1
Q

What is a quorum? What role do they play in distributed systems?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the formula for determining a quorum?

A

A quorum should be at minimum a majority or (n/2 + 1).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When determining the number of servers what should you ensure about the number? Why is that important?

A

The number should be odd as it will potentially support multiple failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

With regard to quorum, why would having 5 nodes be superior to having just 4?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the formula to achieve quorum when considering reads/writes? Why is maintaining that important

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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)

A

(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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How would you describe the following quorum configuration:

(R=1, W=N)

A

Full-replication as every node is available for writes but a single for reading which could not complete if a single node fails.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the two main types of quorum? What do each do?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are three common use cases for a quorum?

A

They are used in distributed databases, cluster management, and certain consensus based protocols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How would a distributed database leverage a quorum?

A

A quorum would help provide consistency where multiple nodes may hold copies of the same data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can a quorum be used to manage a cluster? What problem can it help avoid.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What role can a quorum play in consensus protocols?

A

Some protocols, such as Paxos or Raft, can rely on a quorum to determine the result of an operation or state of the system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are three advantages of a quorum?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are three challenges that can involve use of a quorum?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly