This question tests whether you can compress a consensus algorithm into the pieces that matter, in the right order, without hand-waving the safety part. The structure: states, terms, election, replication, safety.
Raft is a log replication algorithm. Its mental model is "one leader, one log, majority wins". Every node is a follower, a candidate, or a leader, and all client writes flow through the leader, which appends to a replicated log of entries carrying an index and a term number.
Election. Followers run a randomized election timer (150–300ms in the classic tuning). On timeout, a node bumps its term, votes for itself, and sends RequestVote to every peer. A peer grants at most one vote per term and only if the candidate's log is at least as fresh as its own — compare last log term, then index. The first node with N/2+1 votes is leader for that term. The exclusivity is arithmetic: two candidates cannot both reach a majority in the same term.
Replication. The leader appends each client command to its own log, sends AppendEntries to followers, and waits. The entry becomes committed once a majority has durably fsynced it; only committed entries are applied to the state machine and answered to the client. Empty AppendEntries double as heartbeats that keep followers from starting new elections.
Safety. The log matching property — every AppendEntries carries prevLogIndex/prevLogTerm, and followers reject entries that don't chain onto their log — combined with the freshness rule in elections, guarantees a newly elected leader's log contains every committed entry. That's why re-election can't lose data.
Edge cases worth naming in five minutes: a split vote just means another randomized timeout at a higher term; a partitioned leader keeps appending to its own log but can't reach a majority, and on reconnect is demoted by the higher term and rolls back its uncommitted entries; slow followers catch up through nextIndex back-off. The cost story: a committed write is one leader round trip plus fsync on a majority, which is exactly why consensus gives you durability at the price of latency.
Five pieces in five minutes: states, terms, election, replication, safety. If you can state the log matching property and why quorums intersect, you've passed.