Two leaders will take turns for ever if they are not connected to each other?

72 views
Skip to first unread message

Penn (Dapeng) Zhang

unread,
Feb 25, 2018, 3:20:00 PM2/25/18
to raft-dev
Suppose There are five servers S1, S2, S3, S4, S5.
Suppose S1 is currently leader and the others are followers.
Suppose from now on S1 and S2 ban each other's IP for whatever reasons.
Then S2 will timeout and become candidate and request vote for itself, and gets votes from S3, S4, S5, and then becomes leader.
Then S1 will timeout and become candidate and request vote for itself, and gets votes from S3, S4, S5, and then becomes leader.
Then S2, ...
Then S1, ...

S1 and S2 will take turns to become leader for ever. This will make the raft cluster make no/little progress for serving its clients.

Henrik Ingo

unread,
Feb 25, 2018, 3:37:55 PM2/25/18
to raft...@googlegroups.com
Hi Peng

> S1 and S2 will take turns to become leader for ever. This will make the raft
> cluster make no/little progress for serving its clients.

That is correct. Note that with most academic consensus algorithms,
the goal is to prove that the algorithm will continue to make
progress. Raft, as you described, will do that. How fast or slow the
progress will be, is usually not considered.

In practice of course you'd want to avoid such flip-flopping. Ongaro's
thesis - which is the last and fullest publication describing Raft -
actually briefly acknowledges this problem and suggests addition of a
pre-vote step to resolve the issue. It does not however describe such
a step in more detail.

I have written a paper that describes a pre-vote algorithm as well as
some other edge cases to arrive at a more practical Raft algorithm:
http://openlife.cc/blogs/2015/september/4-modifications-raft-consensus

henrik
> --
> You received this message because you are subscribed to the Google Groups
> "raft-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to raft-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
henri...@avoinelama.fi
+358-40-5697354 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://fi.linkedin.com/pub/henrik-ingo/3/232/8a7
Reply all
Reply to author
Forward
0 new messages