Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What is "majority"? #30

Open
nalply opened this issue Mar 7, 2019 · 3 comments
Open

What is "majority"? #30

nalply opened this issue Mar 7, 2019 · 3 comments

Comments

@nalply
Copy link

nalply commented Mar 7, 2019

What is "majority" exactly? More detailed questions:

  1. If the network is split, will be "majority" be recalculed for each partition separately?

  2. What if node A connects to nodes B and C, but node B doesn't connect to C? What is "majority" in such a case?

@DrJian
Copy link

DrJian commented Apr 23, 2019

What is "majority" exactly? More detailed questions:

  1. If the network is split, will be "majority" be recalculed for each partition separately?
  2. What if node A connects to nodes B and C, but node B doesn't connect to C? What is "majority" in such a case?

majority means over half of all node. for example : there are 5 nodes in the cluster, majority means at least 3 nodes. when a cluster split into tow cluster A B cause network error, in terms of A or B, majority also means at least 3 nodes, for which we will get the exactly correct write data after cluster network heal.

@hubertgrzeskowiak
Copy link

Does this imply that we need an odd number of nodes, and that a partition must contain the majority of all nodes? What if there is suddenly three partitions and none has the majority?

@sid597
Copy link

sid597 commented Oct 8, 2020

Does this imply that we need an odd number of nodes, and that a partition must contain the majority of all nodes? What if there is suddenly three partitions and none has the majority?

Yes, we need to have odd no of nodes, if we allow for even no of nodes we can run into the issue of split brain. If there are partitions such that none of them have a majority then elections will continue indefinetly and raft will not be able to respond to client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants