Hoverbear / old-raft-rs

[Incomplete] A Raft implementation in Rust
https://hoverbear.github.io/raft-rs/raft/
MIT License
266 stars 41 forks source link

Dynamic Membership Changes #77

Open Hoverbear opened 9 years ago

Hoverbear commented 9 years ago

Support dynamic membership changes as specified in the dissertation. (See README.md) This is a simpler choice.

Notes from the dissertation:

Safety

ongardie commented 9 years ago

Note that membership changes are simpler in the dissertation, but don't forget about this minor gotcha: https://groups.google.com/forum/#!topic/raft-dev/t4xj6dJTP6E

Hoverbear commented 9 years ago

@ongardie Would you suggest using one (the one in the paper) over the other (the one in your dissertation?)

ongardie commented 9 years ago

I'd suggest the single-server approach (dissertation), unless you have a good reason otherwise. (LogCabin still uses the joint consensus approach but just because I never went back to update the code.)

Hoverbear commented 9 years ago

@ongardie I was reviewing this all today (made some notes above) and was wondering if you've found other applications for the Leader Transfer extension? The other suggested methods of removing the current leader seem rather complicated.

ongardie commented 9 years ago

Nice summary, @hoverbear, but don't forget to add the fix for the bug I linked to in my first comment!

I don't think I've learned more uses for leadership transfer in the last year since my dissertation was published, so my thoughts in 3.10 are still current. Overall, I think it'd be cleaner and more useful to implement the leadership transfer approach and then use it when removing the cluster leader. But I also have to admit I still have never implemented leadership transfer myself (maybe others on raft-dev have?).

tbg commented 9 years ago

I think it's also worth outlining adding a member from the perspective of the new member. A Raft instance must respond to anyone trying to talk to it, and there must be a way to "boot" it without it turning into a one-group node. Instead it should just sit there and wait for incoming messages, in case it is added to an existing group. This "talking to strangers" is new with config changes and at the heart of why they're probably the most complex and error-prone part of Raft.