All of us who are not beginners got there by asking beginner questions. :)
A follower does not necessarily know who the leader is, or even if there is one. What distinguishes a follower is that it is not trying to become the leader, at least for the current term. Either because:
- It has received an AppendEntries from the leader (and therefore knows who the leader is)
- It has received a RequestVote from a candidate who it has given its vote to, but does not yet know if that candidate has won the election
- It used to be the leader in a previous term but has received an error reply from another node indicating that its term has ended and a new term has started (which may or may not already have a leader)
- It has just rebooted and doesn’t know the current state of the cluster (but chances are there’s already a leader)
-d