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

假如有 6 个节点, 突然出现分区变成 3-3, 导致出现两个 leader #99

Open
bxb100 opened this issue Feb 13, 2023 · 2 comments

Comments

@bxb100
Copy link

bxb100 commented Feb 13, 2023

那么 client 发送到隔离二者且不是都能正常返回吗

那这样怎么能保证一致性, 还是 raft 的大多数指的是 >= 4?

@maemual
Copy link
Owner

maemual commented Feb 13, 2023 via email

@realyixuan
Copy link

那么 client 发送到隔离二者且不是都能正常返回吗

那这样怎么能保证一致性, 还是 raft 的大多数指的是 >= 4?

大多数 = n / 2 + 1

4 = 6 / 2 + 1

6 个节点的大多数是4个, 所以只能忍受两个节点故障(,5 个节点的 大多数是3个,也只能忍受两个节点故障)。从这个角度讲,奇数个节点更实际。

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

3 participants