Raft Consensus

Leader election and log replication in distributed systems

N1followerN2followerN3followerN4followerN5follower
● Follower● Candidate● Leader

Node States

N1
Term 0Log: []
N2
Term 0Log: []
N3
Term 0Log: []
N4
Term 0Log: []
N5
Term 0Log: []

Activity

Start simulation to see activity

How Raft Works:

  • Leader Election: Followers timeout and become candidates, requesting votes
  • Log Replication: Leader appends entries and replicates to followers
  • Commit: Entries are committed once replicated to a majority
  • Failure Recovery: New election triggered when leader fails