2 ms·
> A Raft cluster must have an odd number of nodes. Why must a Raft cluster have an odd number of nodes? > > how are is "majority" calculated? > ceil(nodes/2)
by deathanatos 12y ago
> A Raft cluster must have an odd number of nodes.
Why must a Raft cluster have an odd number of nodes?
> > how are is "majority" calculated?
> ceil(nodes/2).
A majority is defined as having greater than half the votes. I.e., you need nodes / 2 + ((nodes + 1) % 2) votes, or more simply votes > nodes / 2. Even in an even-sized cluster that can only hold true for one node, and not cause splits.