Is the raft consensus algorithm a byzantine fault tolerant algorithm?
How many (percentage of) nodes are required to reach agreement/consensus?
No, Raft's initial description (by Diego Ongaro and John Ousterhout (1)) is not byzantine fault-tolerant.
Imagine a node that votes twice in a given term, or votes for another node that has a log which is not up-to-date like its own and that node becomes leader. Such behaviour could cause split-brains (case where two nodes believing themselves to be leader) or inconsistencies in the log.
Many other scenarios like sending fake but valid heartbeat messages are also examples that show Raft is not byzantine fault-tolerant.
However there are several papers where a byzantine fault-tolerant version of Raft is presented (2).
To reach consensus Raft needs the majority of nodes to be alive - > 50%
.
This means in order to tolerate t
failures, there have still to be t+1
nodes working correctly.
So 2t+1
nodes are needed to be t-resilient, which is the smallest amount of nodes needed to reach consensus in presence of partial synchrony (3) with just tolerating omission failures.