-
Notifications
You must be signed in to change notification settings - Fork 267
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
leader election without log involved? #63
Comments
Hi Shifeng Yes the library will work without But please be aware that if you need dynamic membership changes, you MUST append logs. |
Thanks Willem! I tested with no raft_recv_entry() call / no log maintainance, and the election did work as well. As for the dynamic membership changes, suppose I have a five servers {A,B,C,D,E} configuration. If any one of those server crashed and rebooted to join again, is it kind of dynamic membership change? In my test, I killed one server, and the rest four servers still can elect a new leader as well (though I did not test the reboot+join, but the leader will send the appendentries to the rebooted server who will become the follower again). My understanding of the dynamic membership change is the original configuration changed. For example, the {A,B,C,D,E} changed to {A.B,C,D,F}. (from the raft paper, "it will occasionally be necessary to change the configuration, for example to replace servers when they fail or to change the degree of replication") Thanks, |
No this isn't a dynamic membership change. It's just normal recovery.
If you change the membership while the servers are online, then yes, this is a dynamic membership change. Please check out https://github.com/willemt/raft#membership-changes. Dynamic membership changes can only be done via If membership is static (eg. {A,B,C,D,E} never changes), then you don't need to use the log. It's worth pointing out, that if you can change the membership (eg. {A,B,C,D,E} changed to {A.B,C,D,F}) while the servers are offline, then you don't need to use the log! |
Thanks for the clarification! Shifeng |
It seems @willemt comprehensively replied to this question. @ShifengZhang can this issue be closed? |
Perhaps a FAQ file could be added and linked from the README. The conversation from this issue (and other issues marked with the "FAQ" tag) be copied there, so they don't remain open but the information is still reasonably visible. |
hi @freeekanayaka, I am following the "label important issues as FAQ and keep them open" style that https://github.com/h2o/h2o does. An FAQ file sounds nice, but I haven't seen projects use them. I'll give this a think. It would be nice to remove some issues |
Yes, I think this issue is helpful; and I can close it or keep open to follow the "label important issues as FAQ and keep them open" style. Either way works for me. Thanks. |
Hi Willem,
Your implementation on Raft is pretty cool for solving the replicated finite state machine problem. If I only focus on the leader election, no log needs to maintain (e.g., no raft_recv_entry() call from clients), which means we only depend on the term parameter for the election, could I still use it as a leader election?
Thanks,
Shifeng
The text was updated successfully, but these errors were encountered: