Quorum Flashcards

(7 cards)

1
Q

What is quorum?

A

In a distributed environment, a quorum is the minimum number of servers on which a distributed operation needs to be performed successfully before declaring the operation’s overall success.

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

What problem is quorum solving?

A

Once a system decides to maintain multiple copies of data, another problem arises: how to make sure that all replicas are consistent, i.e., if they all have the latest copy of the data and that all clients see the same view of the data?

Quorum enforces the consistency requirement needed for distributed operations.

It is used for CONSENSUS SYSTEMS.

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

In a cluster, how is quorum used? And what systems use it?

A

Cluster quorum → “Can the system operate at all?” Quorum ensures that there’s no state divergence, that no nodes can both claim different system of record statuses.

Used by: Raft, Paxos, Zookeeper, etc.

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

What does this mean: (N=3, W=2, R=2)

A

W+R > N, so strongly consistent, but also durable:

W=2 → write reaches at least two copies

R=2 → read checks at least two copies

Since 2 + 2 > 3 → guaranteed overlap
→ strongly consistent

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

What does (N=3, W=1, R=3) mean?

A

W+R > N, so strongly consistent, but also durable:

Fast writes (only 1 node)

Slow reads (must query all 3)

Not durable (if the node that accepted the write dies, data may be lost)

R + W = 4 > 3 → still technically strongly consistent
(but unsafe durability-wise)

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

How quorum systems prevent a user from reading stale data?

A

In the N/R/W quorum model:

With N=3, W=2, R=2:

A read must contact 2 replicas, not 1.

A write must write 2 replicas, not 1.

Thus, staleness is impossible. Quorum math forces overlap no matter what.

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

What does durability mean here?

A

That data writes are guaranteed. If W = 1, but there are 3 nodes, the system might be consistent but thew write might not persist in a failure - like if W goes down.

NOTE: All writes will EVENTUALLY be replicated, it’s just a matter of when.

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