educative.io

How to get the commit quorum and an abort quorum on the example

Good afternoon,

I am new to learn system design.
On the example, it said "we have three participants , and we assume that the protocol would use quorums of size VA = 2, and VC = 2 ". I was wondering how to get VA and VC. I was wondering how the surrogate coordinate get the number of VA and VC. Does every node know the total number of the participants before the network partition happens, and then do the calculation VA and VC = V//2 + 1?

Thank you for the help.

Tao


Course: Distributed Systems for Practitioners - Learn Interactively
Lesson: Quorum-Based Commit Protocol

Hi @tao_feng !!
In the context of the quorum-based commit protocol, the values for VA (abort quorum) and VC (commit quorum) are parameters that need to be carefully selected based on the total number of participants (V) in the distributed system. The goal is to choose values for VA and VC such that the following condition holds:

[ V_A + V_C > V ]

Here’s an explanation:

  1. Definition of VA and VC:

    • ( V_A ) is the size of the abort quorum.
    • ( V_C ) is the size of the commit quorum.
  2. Choosing Quorum Sizes:

    • The values of VA and VC are chosen to ensure that the sum of the abort and commit quorums is greater than the total number of participants (V).
    • The specific values will depend on the desired fault tolerance and system characteristics.
  3. Formula for Quorums:

    • The lesson doesn’t explicitly mention a formula for choosing VA and VC, but one common approach is to aim for a simple majority. Therefore, a common choice is ( V//2 + 1 ) for both abort and commit quorums.
  4. Ensuring Safety:

    • The key is to ensure that, even in the presence of network partitions, at least one side of the partition can form a commit quorum and another side can form an abort quorum. This prevents conflicting decisions on different sides of the partition.

In summary, the coordinator or surrogate coordinator needs to be aware of the total number of participants (V) in the system. The values for VA and VC are then chosen based on the desired fault tolerance and the condition ( V_A + V_C > V ). The specific formula ( V//2 + 1 ) is a common choice to achieve this condition and ensure the safety of the protocol.
I hope it helps. Happy Learning :blush: