Elasticsearch Number of Master Nodes

By Opster Team

Updated: Mar 21, 2023

| 1 min read

Before you dig into the details of this technical guide, have you tried asking OpsGPT?

You'll receive concise answers that will help streamline your Elasticsearch/OpenSearch operations.


Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch/ OpenSearch operation.

Aside from learning about Elasticsearch master nodes and the recommended number you should configure, 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.

Before you dig into the details of this guide, have you tried asking OpsGPT? You’ll receive concise answers that will help streamline your Elasticsearch/OpenSearch operations.

Try OpsGPT now for step-by-step guidance and tailored insights into your search operation.

Overview

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.

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?


Get expert answers on Elasticsearch/OpenSearch