# Raft Leader Elect
__*random election timeout*__

![left](./student-guide/diagram/RaftLeaderElect03_aa_001_20220511.png)

------------------------------------------------------------
Next, let's look at a special case where after the election timeout triggers an election, more than 2 nodes increment their term, change themselves to the candidate role, and vote for themselves. And they received exactly the same number of follower consent messages. What should I do at this time? The system will restart a new round of voting until a unique leader is generated. In order to avoid the possibility that a leader will never be elect or elected multiple times, we can use an algorithm called random election timeout to reduce the probability of repetition, which can be understood as the beginning leader of each node At the time of elect, the election timeout is randomly set within a range instead of using a uniform value, so that there is a high probability that multiple candidates will have the same number of votes. 

