Term
|
Explanation
|
---|---|
Leader
|
The node that performs the following tasks:
▪ executes synchronously replicated transactions, including grid configuration changes and schema changes
▪ sends heartbeat messages to the other grid nodes and monitors the responsiveness of the grid nodes
▪ runs the GAM and balances the total number of replication units for each partition across the grid.
|
Follower
|
A node that performs the following tasks:
▪ receives transactions from the leader
▪ responds to heartbeat messages from the leader
▪ initiates election of new leader (if election timeout is exceeded)
|
Candidate
|
A node that stands as a candidate for the grid leader, by initiating a new leadership term, and sending vote requests to other grid nodes.
|
Heartbeat
|
A regular message sent by the leader to inform followers that the leader is still active.
|
Election timeout
|
Maximum time interval between heartbeat messages from the grid leader to a node. If the election timeout is exceeded, the node assumes that the leader has failed and initiates the election of a new leader (see pre-voting).
You set the election timeout by configuring the Grid.RaftElectionTimeout parameter, see RaftElectionTimeout.
|
Leadership term
|
The period of time that starts with a leadership election and ends when the elected leader fails, or if the election fails to elect a leader.
|
Pre-voting
|
If pre-voting is enabled, a follower (for which the election timeout has expired) sends a pre-vote request to all grid nodes to check if other nodes would allow the follower to become the new leader. If the majority of nodes respond positively, the follower changes state to CANDIDATE, starts a new leadership term, and sends out vote requests.
Unlike vote requests, nodes can accept pre-vote requests from multiple followers during a single leadership term.
Note If pre-voting is not enabled, the follower changes state to CANDIDATE immediately after the election timeout.
You enable pre-voting by configuring the Grid.RaftPreVoteEnabled parameter, see Grid section.
|
Voting
|
During an election, nodes receive vote requests from candidates.
Before a node accepts a vote request, the node checks that the leadership term that the candidate has started is not earlier than the current leadership term.
A node can accept only one vote request in any leadership term.
|
Leader stickiness
|
If leader ‘stickiness’ is enabled, a node does not accept any vote requests (or pre-vote requests) if its own election timeout has not expired. This prevents the grid from changing the leader if the current leader is performing properly for the majority of nodes.
You enable leader stickiness by configuring the Grid.RaftLeaderStickinessEnabled parameter, see Grid section.
|