How to make a node that will not become a candidate? #1235
-
I want an “arbiter” node that will help the network reach consensus, but will never be a leader itself. Do I understand correctly that setting let cfg = openraft::Config {
enable_elect: false,
..Default::default(),
}; Will a node with this setting participate in the voting of the other nodes? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yes. Yes, if one nodes goes offline, but not yet being removed from the cluster with If a node is removed from the cluster with |
Beta Was this translation helpful? Give feedback.
Yes.
enable_elect: false
will disable election for this node.And yes, this node will still vote for other leader.
Yes, if one nodes goes offline, but not yet being removed from the cluster with
Raft::change_membership()
, one of the other two nodes will elect and become the leader. The cluster is still in a consistent state.If a node is removed from the cluster with
Raft::change_membership()
, the state is also consistent, but a two nodes cluster won't tolerate any node failure.