Raft's Basics and High-Level Workflow
Learn about the basics of the Raft consensus algorithm and review its high-level workflow.
Raft basics
This lesson will cover the building blocks of a Raft consensus algorithm: the server roles used in the algorithm, how Raft handles the elections and terms, and what types of Remote Procedure Calls (RPCs) it uses to achieve its functionality.
Server states
A Raft cluster operates with a minimum of votes in favor of a specific server, where is the total number of members in the cluster. For example, if there are 5 servers in the cluster, it would need 3 servers to form a
- Leader: In normal operations, one leader handles and processes all the client requests.
- Follower: All the other servers besides the leader are followers. The followers are passive; they issue no requests on their own but follow directions from the leader and respond to the instructions sent by the leader and the candidates.
- Candidate: A server transitions from the follower to the candidate state when it initiates a new
.election The process of electing a new leader for a given term.
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.