Elasticsearch Number of Master Nodes

Elasticsearch Number of Master Nodes

Opster Team

March 2021

In addition to reading this guide, we recommend you run the Elasticsearch Health Check-Up. It will detect issues and improve your Elasticsearch performance by analyzing your shard sizes, threadpools, memory, snapshots, disk watermarks and more.

The Elasticsearch Check-Up is free and requires no installation.

Run the Elasticsearch check-up to receive recommendations like this:

checklist Run Check-Up

The following configuration error was detected on node 123...



This error can have a severe impact on your system. It's important to understand that it was caused by...



In order to resolve this issue and prevent it from occurring again, we recommend that you begin by changing the configuration to...


X-PUT curl -H "Content-Type: application/json" [customized recommendation]


Master nodes are responsible for actions such as creating or deleting indices, deciding which shards should be allocated on which nodes, and maintaining and updating the cluster state on all of the nodes. The cluster state includes information about which shards are on which node, index mappings, which nodes are in the cluster and other settings necessary for the cluster to operate. 

If you have just one or two master nodes in your Elasticsearch cluster, then the loss of one of your master nodes due to mechanical failure, network or configuration issues will result in your entire Elasticsearch cluster becoming unavailable.

How to resolve it

For more information about what master nodes are, and how to create a robust dedicated master node configuration, see Dedicated Master Node in Elasticsearch – Important Tips 

However, if you just want a quick fix without creating dedicated master nodes, then it is sufficient to ensure that 3 of your nodes are master eligible by setting in the elasticsearch.yml config file:

node.master: true 

Then restart each node, waiting for the cluster to go green before restarting the next node.

Ideally these master nodes should be in different availability zones in your data centre so that a networking or power failure does not affect all 3 master nodes simultaneously.

Run the Check-Up to get a customized report like this:

Analyze your cluster