A master node keeps an Elasticsearch cluster organized. It handles cluster-wide work such as index management, shard allocation, node operations, and maintaining cluster state. These are lightweight administrative duties, separate from document indexing, searching, and deletion. section 3.2.5 section 14.6.1
The master role makes a node master-eligible; it does not immediately make that node the active cluster master. A cluster has one active master, while other master-eligible nodes remain ready to vote and take over if needed. Nodes can also carry data, ingest, machine-learning, or other roles. section 14.6 section 14.6.1
When the active master fails
If master-eligible nodes stop receiving heartbeats from the active master, they call an election. Each eligible node votes, and the elected node resumes cluster-management duties. Election timing can be configured; the cited example uses a 500 ms initial timeout before a node calls for an election. section 14.6.2
node.roles: [master, data, ingest, ml] #1
Assigning `master` in `node.roles` makes the node eligible to participate in master elections; additional listed roles can be assigned alongside it. section 3.2.5
Operate master nodes with cluster health in mind:
- Keep a stable active master, because it coordinates responses when nodes join, leave, or become unresponsive. section 15.3.1
- Provide other master-eligible nodes so the cluster can elect a replacement after an active-master failure. section 14.6.1 section 14.6.2
- Do not treat the master as the document CRUD worker; data nodes persist, index, search, and delete documents. section 3.2.5
