The reason for getting a majority of the votes is to avoid a problem called a split brain.
Basically, when the network fails, you do not want the two parts of the system to continue as usual. you want to continue, and another to understand that it is not part of a cluster.
There are two main ways to achieve a shared resource, for example, a shared drive on which the leader has a lock, if you see a lock in which you are part of a cluster, if you are not a user, again. If you hold a castle, you are a leader, and if you do not. The problem with this approach is that you need this share.
Another way to prevent brain splitting is to count the votes, if you get enough votes, you are the leader. This still works with two nodes (for quorum 3), where the leader says he is the leader and the other node, acting as a โwitnessโ, also agrees. This method is preferable since it can work in the architecture without sharing, and this is what Zookeeper uses
As Michael noted, a node cannot know whether the reason it does not see other nodes in the cluster is because these nodes are omitted or there is a network problem - the safe bet is that there is no quorum.
Arnon Rotem-Gal-Oz
source share