Raft

#Distributed_System #Raft
Raft is a consensus algorithm designed to manage a replicated log. It’s used to ensure that a cluster of machines can work together in a reliable and fault-tolerant manner, providing strong consistency even in the presence of failures.

Roles of Raft

  1. Leader: The central node that handles all client requests, replicates log entries to followers, and manages the cluster.
  2. Follower: Passive nodes that respond to requests from the leader and apply log entries.
  3. Candidate: Nodes that attempt to become leaders during an election.

Key components

  1. Leader Election: Ensures that one and only one leader is elected among the cluster nodes.
  2. Log Replication: Ensures that logs are replicated consistently across all nodes.
  3. Safety: Ensures that the system behaves correctly and consistently, even in the presence of failures.
  4. Membership Changes: Manages changes to the cluster’s membership dynamically.

Leader Election

Log Replication

Safety

Membership Changes

Algorithm in Detail

  1. Election Process:
  1. Log Replication Process:
  1. Safety and Consistency:

Reference