Ensure exactly one node is the leader at a time; if it fails, elect a new one.
Follower --(election timeout)--> Candidate
|
votes from majority of nodes
|
v
Leader
leader sends heartbeats; followers revert if miss heartbeat
A meeting with one chair: when the chair leaves, the longest-standing member takes it; if they all leave, the next arrival becomes chair.
Interview tip: Mention Raft by name — it’s the algorithm interviewers want you to describe.