Control node election

Summary

The key components involved in the control node election process are:

  • Cluster nodes: Communicate over the cluster control link and participate in the election process

  • Election requests: Broadcast every 3 seconds by nodes when clustering is enabled

  • Priority values: Set between 1 and 100 where 1 is the highest priority

  • Control node: The elected node that coordinates cluster operations

Workflow

These stages describe how cluster nodes elect a control node:

  1. When clustering is enabled for a node (or when it first starts up with clustering already enabled), the node broadcasts an election request every 3 seconds.
  2. Any other nodes with a higher priority respond to the election request. The priority is set between 1 and 100, where 1 is the highest priority.
  3. If after 45 seconds, a node does not receive a response from another node with a higher priority, then it becomes the control node.
    Note

    If multiple nodes tie for the highest priority, the cluster node name and then the serial number is used to determine the control node.

  4. If a node later joins the cluster with a higher priority, it does not automatically become the control node. The existing control node always remains as the control node unless it stops responding, at which point a new control node is elected.
  5. In a "split brain" scenario when there are temporarily multiple control nodes, the node with highest priority retains the role while the other nodes return to data node roles.
    Note

    You can manually force a node to become the control node. For centralized features, if you force a control node change, then all connections are dropped, and you have to re-establish the connections on the new control node.