Generated by GPT-5-mini| Raft (algorithm) | |
|---|---|
![]() | |
| Name | Raft |
| Author | Diego Ongaro; John Ousterhout |
| Introduced | 2014 |
| Area | Distributed systems; Consensus algorithm |
| Status | Active |
Raft (algorithm) Raft is a consensus algorithm designed for managing a replicated log in distributed systems. It was introduced by Diego Ongaro and John Ousterhout to provide a more understandable alternative to other consensus algorithms, enabling fault-tolerant services across clusters of machines. Raft formalizes leader election, log replication, and safety guarantees to maintain a consistent state machine despite failures.
Raft was presented at the USENIX Annual Technical Conference in a paper by Ongaro and Ousterhout that contrasted with prior work such as Leslie Lamport's Paxos family. The algorithm decomposes consensus into subproblems familiar to practitioners at companies like Google, Amazon, and Microsoft and to projects such as Apache ZooKeeper, etcd, and Consul. Raft's goals include understandability, implementability, and strong consistency across replicas, which made it influential in distributed storage systems like OpenStack and Kubernetes.
Raft's design separates concerns into leader election, log replication, and safety rules; this modular structure echoes engineering practices at institutions like Stanford University and Carnegie Mellon University. The protocol specifies terms, leader leases, and a leader-based replication model similar in intent to mechanisms used in systems from Facebook and Netflix. Raft offers properties such as linearizability and state machine replication guarantees comparable to those advocated in literature from ACM SIGOPS and IEEE conferences.
Raft organizes time into monotonically increasing terms, elects a leader per term, and records client commands in a replicated log that followers apply to state machines. The protocol leverages Remote Procedure Call patterns familiar to implementers at Amazon Web Services and Google Cloud Platform, and uses AppendEntries and RequestVote RPCs to synchronize state. Raft's commit rules ensure that once a log entry is committed it survives leader changes, an objective emphasized in foundational work from Massachusetts Institute of Technology and University of California, Berkeley researchers.
When a leader fails, followers trigger elections by incrementing current term and soliciting votes; candidates win by obtaining a majority quorum across nodes, a quorum concept used in systems developed by Red Hat, VMware, and Canonical. Once elected, leaders replicate entries via AppendEntries RPCs and advance commit indices when replicas acknowledge entries on a majority. Leader election timeout choices and heartbeat intervals are tuning parameters referenced in operational guidance from Dropbox and LinkedIn for reducing split votes and improving availability.
Raft provides safety by ensuring that committed entries are durable and prefix-ordered, so any leader that commits an entry must have that entry present in its log; similar safety concerns are central to protocols discussed at ACM and USENIX workshops. Liveness guarantees hold under partial synchrony assumptions popularized by researchers at Princeton University and ETH Zurich: with reliable message delivery and bounded timeliness, Raft will elect a leader and make progress. Fault tolerance in Raft tolerates crash failures of minority nodes, a resilience model also used by distributed databases at Oracle and SAP.
Practical Raft deployments incorporate optimizations such as log compaction, snapshotting, leader transfer, and batching—techniques also present in systems from Intel and NVIDIA. Implementations exist across languages and projects including work by contributors from HashiCorp (Consul), CoreOS (etcd), and open-source repositories with bindings from organizations like Google and Microsoft Research. Extensions address membership changes via joint consensus and utilize mechanisms akin to coordination services discussed in literature from Berkeley and MIT CSAIL.
Raft is applied in coordination services, distributed key-value stores, and orchestration platforms used by enterprises such as Red Hat and VMware. Compared with Paxos variants, Raft emphasizes understandability and a defined leader role, while Paxos literature from Leslie Lamport focuses on minimality and theoretical generality; both families underpin systems at Facebook and Google. The choice between Raft and Paxos-style approaches often hinges on engineering factors documented in case studies from Stanford and Carnegie Mellon deployments.
Category:Distributed algorithms