13 Mart 2023 Pazartesi

Quorum Nedir ? - Çoğunluğu Sağlayan Sayı

Giriş
NotYazılım Mimarisi - Replica yazısına bakabilirsiniz.

Açıklaması şöyle. Quorum oy çokluğu demek
Distributed consensus based on a quorum model
How much is Enough?
Açıklaması şöyle. Yani çoğunluğu sağlayan en küçük sayı Quorum olarak yeterli.
We defined Quorum as the minimum number of servers that need to acknowledge an operation before it can be considered successful. But what's a good number, such that we get both, good application performance & consistency.
We generally prefer for majority of nodes in the cluster to acknowledge any operation for it to be considered successful. Thus, for a N node cluster, Quorum should be of N/2 + 1 nodes.

What if I choose Quorum to be > N/2 + 1? 
Well, you will have more number of nodes to acknowledge your changes, and so you'll have a performance hit, when compared to choosing N/2 + 1 as your Quorum. Refer to Scenario 1 for understanding the impact.

What if I choose Quorum to be < N/2 + 1? 
In this case, only minority of the nodes in the cluster are guaranteed to have the changes. In case those nodes go down/are network partitioned, the changes wouldn't be visible to the end users & would have consistency issues. Refer to Scenario 2 for understanding the impact.
Bir başka açıklama şöyle
The basis of the algorithm is that for any action to take place there must be quorum which is decided by (N/2) +1, with N voting members of the distributed system. When an action is requested, it must be voted on by all voting members. If it receives greater than 50% of the votes, then the action can take place. In this case, the action is written to a log on each node which is the source of truth. By having distributed consensus, you get the security of knowing anything written to the log is an allowed action as well as having log replication and leader elections.
Real Life Usage
Açıklaması şöyle
1) Consensus algorithms like Paxos, Raft are all quorum based.
2) Cassandra uses write quorum to ensure data consistency, where a write is considered successful only after its replicated to at least quorum of replica nodes.
3) Leader Election happens only if leader gets vote from majority of the servers i.e Quorum.

Hiç yorum yok:

Yorum Gönder