Voter/leader members in Raft

41 views
Skip to first unread message

Sharon Avni

unread,
Feb 24, 2022, 3:22:14 AM2/24/22
to raft-dev

Hello,

My team and I want to make a slight variation to the algorithm, and I wanted to make sure I’m not breaking any basic assumptions.

In our implementations, we have two types of hosts, I’ll call them A host and B host. A B host cannot handle being a leader.

The problem we have is that when we upgrade our system, we have to restart all A hosts while B hosts are all alive.

Currently, only A hosts are members of the Raft council, which means when they are restarted, we have to wait for a quorum of 3 A hosts before electing a leader.

That causes our upgrade process to be very slow since we have to wait for almost all A hosts in order to bring up all of our Raft councils.

The solution we thought of is to have the B hosts be members “Voting only” members of the council and A hosts be “Leader Only” members of the council, which would mean we only need 1 of the council members to start to elect a leader, which would speed up our upgrade process significantly.

We want to separate the voting hosts of the Raft council from the hosts that become leaders.

  • “Voting Only” members never attempt to become leaders, but are considered part of the quorum.
  • “Leader Only” members initiate elections and get appendEntries(when not the leader themselves) from the leader, but do not vote in elections and are not considered part of the quorum.
    • Because the “Leader Only” members are not part of the quorum, they can join and leave the Raft council freely without adding an entry in the Raft log.

Do you see a problem with this variation?

Thanks in advance!

Reply all
Reply to author
Forward
0 new messages