Leader Failover States — Election, Split Brain, Old Leader Returns

Leader Failover States — Election, Split Brain, Old Leader Returns A lifecycle diagram generated by Archify. Node states Uncertainty window Rejoining Terminal Follower · replicating the log · Node states · reads may be stale 01 Follower replicating the log reads may be stale Leader · accepts writes · Node states · single writer 03 Leader accepts writes single writer Candidate · requests votes · Node states · election timeout 02 Candidate requests votes election timeout Unreachable Leader · maybe just slow · Uncertainty window · cannot tell crash from pause Unreachable Leader maybe just slow cannot tell crash from pause Recovering Node · catches up on the log · Rejoining · must not lose writes Recovering Node catches up on the log must not lose writes Stale Leader Returns · still thinks it leads · Terminal · split brain risk Stale Leader Returns still thinks it leads split brain risk heartbeat timeout majority of votes another node wins no heartbeats new election fails over log is current writes while away Legend initial state active waiting decision success failure / exit final state