Raft (algorithm)

It was meant to be more understandable than Paxos by means of separation of logic, but it is also formally proven safe and offers some additional features.

[3] Raft is not a Byzantine fault tolerant (BFT) algorithm; the nodes trust the elected leader.

If no heartbeat is received the follower changes its status to candidate and starts a leader election.

The consensus problem is decomposed in Raft into two relatively independent subproblems listed down below.

[1] Raft uses a randomized election timeout to ensure that split vote problems are resolved quickly.

Each client request consists of a command to be executed by the replicated state machines in the cluster.

After being appended to the leader's log as a new entry, each of the requests is forwarded to the followers as AppendEntries messages.

This mechanism will restore log consistency in a cluster subject to failures.

The State Machine Safety is guaranteed by a restriction on the election process.

This rule is ensured by a simple restriction: a candidate can't win an election unless its log contains all committed entries.

Such failures are handled by the servers trying indefinitely to reach the downed follower.

It can take several weeks or months between single server failures, which means the values are sufficient for a stable cluster.