Raft
Raft is a distributed consensus algorithm that uses leader election and replicated logs to coordinate nodes and maintain consistent replicated state despite failures.
ScyllaDB in Action
Raft is a distributed consensus algorithm designed to make replicated-state coordination understandable through leader election, log replication, and safety rules.
- How it is used
- Provides strongly ordered internal metadata changes, including schema and topology updates.
- How deep it goes
- Explains leader election, replicated-log commits, majority acknowledgment, and failure trade-offs without detailing implementation mechanics.
- Examples
- Uses concurrent schema updates and a leader-to-follower log-append diagram to illustrate agreement.
- What you can do after
- Evaluate/understand why internal cluster changes favor Raft consistency despite leader-election downtime.
Kafka for Architects
Raft is a consensus algorithm that coordinates replicated state among nodes and commits updates after acknowledgment by a quorum.
- How it is used
- Coordinates Kafka controller state and metadata updates through quorum-based replication.
- How deep it goes
- Explains leader commitment, follower acknowledgment, election safety, quorum loss, and metadata-log boundaries.
- Examples
- Uses metadata-log replication, controller quorum, data-center placement, snapshots, and broker metadata requests as concrete examples.
- What you can do after
- Evaluate controller placement and metadata-consistency consequences using quorum and leader-election behavior.
Apache Kafka in Action
Raft is a distributed consensus algorithm and protocol for coordinating replicated state machines so cluster nodes agree on replicated state.
- How it is used
- Coordinates Kafka brokers, metadata, partition assignments, leader elections, and failover through an integrated controller cluster.
- How deep it goes
- Explains KRaft roles, controller quorum sizing, metadata storage, and migration steps without detailing Raft internals.
- Examples
- Uses one-, three-, and five-controller configurations plus ZooKeeper-to-KRaft metadata migration as operational examples.
- What you can do after
- Operate/configure Kafka KRaft clusters with appropriate controller counts and understand the path from ZooKeeper coordination to KRaft.
Acing the Frontend Interview
Raft is a consensus algorithm that organizes agreement around leader election, log replication, and safety under failures.
- How it is used
- Explains how distributed systems maintain consistent decisions and coordinate replicated state despite partial failures.
- How deep it goes
- Decomposes consensus into leader election, log replication, and failure safety, without detailing implementation mechanics.
- Examples
- Uses leader election, log replication, and state-machine synchronization as representative consensus operations.
- What you can do after
- Evaluate Raft against Paxos and explain its role in fault-tolerant distributed coordination.
Also covered in
- The Coder CafeIn early access (MEAP)
- Think Distributed Systems
What to know first
- leader electionLeader election is a distributed coordination process that selects one eligible participant to act as leader or coordinator.
- nodeA node is a discrete element of a graph, tree, linked structure, network, or computing system that can represent an entity, state, or component and may connect to other elements.
- scalabilityScalability is the ability of a system or process to accommodate growth in workload, size, or demand while maintaining acceptable operation.
Related concepts
- consensuskind of · Consensus is sufficient agreement among participants or processes on a shared decision, value, state, assessment, or outcome.
- KRaftimplemented by · KRaft is Apache Kafka’s Raft-based metadata-management mode, using an internal controller quorum instead of ZooKeeper.
- Paxosalternative to · Paxos is a family of distributed consensus algorithms that enables potentially failing processes to reach agreement despite failures and asynchronous communication.
- replicated state machineimplements · A replicated state machine is a set of replicas that apply the same ordered operations to maintain equivalent state across nodes.
- leader electionimplements · Leader election is a distributed coordination process that selects one eligible participant to act as leader or coordinator.
Questions about Raft
What is Raft?
Raft is a distributed consensus algorithm that uses leader election and replicated logs to coordinate nodes and maintain consistent replicated state despite failures.
Which Manning books explain Raft?
ScyllaDB in Action, Kafka for Architects, Apache Kafka in Action and Acing the Frontend Interview.
What should I know before learning Raft?
Manning books that teach Raft usually introduce leader election, node and scalability first.
What is the difference between Raft and Paxos?
Raft is a distributed consensus algorithm that uses leader election and replicated logs to coordinate nodes and maintain consistent replicated state despite failures. Paxos is a family of distributed consensus algorithms that enables potentially failing processes to reach agreement despite failures and asynchronous communication.
What is Raft a kind of?
Raft is a kind of consensus. Consensus is sufficient agreement among participants or processes on a shared decision, value, state, assessment, or outcome.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



