benbjohnson / thesecretlivesofdata

Understanding what your bits do when you're not looking.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Raft leader election during network split

Scooletz opened this issue · comments

Isn't the leader elected by majority of all nodes? If so, why during the presentation the network partition allows to create two leaders in disjointed partitions.

Only one leader can be elected per term. You can have two leaders for different terms but the leader of the older term cannot commit anything since there is a majority of nodes already at the higher term.

Does that make sense?

Yes it does. Once the first leader is elected, a partition can occur and he can be left with one follower. The rest of nodes can create majority and elect a new leader in new term.
Thx for clarification. I found it hard to see in the presentation.