Leader Election Flow
One follower times out first, starts a new term, requests votes, and becomes leader only after majority approval.
Heartbeat missing
A follower stops hearing from the leader before its randomized timeout expires.
Candidate
The node increments the term, votes for itself, and starts an election.
Vote check
Peers check term and log freshness before voting.
Quorum
Majority votes make the candidate leader. No majority means retry later.