Content deleted Content added
Sboehringer (talk | contribs) m →Leader Election: corrected wrong wording |
|||
Line 14:
When the existing leader fails or when you start your algorithm, a new leader needs to be elected.
In this case, a new ''term'' starts in the cluster. A term is an arbitrary period of time on the server
A leader election is started by a ''candidate'' server. A server becomes a candidate if it receives no communication by the leader over a period called the ''election timeout'', so it assumes there is no acting leader anymore. It starts the election by increasing the term counter, voting for itself as new leader, and sending a message to all other servers requesting their vote. A server will vote only once per term, on a first-come-first-served basis. If a candidate receives a message from another server with a term number at least as large as the candidate's current term, then the candidate's election is defeated and the candidate changes into a follower and recognizes the leader as legitimate. If a candidate receives a majority of votes, then it becomes the new leader. If neither happens, e.g., because of a split vote, then a new term starts, and a new election begins.<ref name="paper" />
|