Raft is a consensus algorithm that enables multiple servers to work together as a reliable system despite failures. It uses a leader-follower model where one server coordinates log replication across the cluster. The algorithm ensures consistency through leader election, log replication with majority agreement, and commit protocols. Key mechanisms include heartbeats to maintain leadership, voting rules that prevent inconsistent leaders, and a two-phase configuration change process for scaling. With proper tuning of election timeouts and typically 5 servers, Raft provides fault tolerance while remaining conceptually simpler than alternative consensus protocols.
Table of contents
Replicated State MachinesLog Replication and CommitLeader Append-Only, State Machine Safety and Leader CompletenessScaling outMinimizing LatencyUnderstandable ConsensusSort: