Elasticsearch Elasticsearch Configuring Optimal Dedicated Master Nodes

By Opster Team

Updated: Mar 10, 2024

| 2 min read

What does this mean? 

Ideally, Elasticsearch clusters should have three dedicated master nodes and no other nodes with master roles. If you have other nodes carrying master roles, they should be reconfigured.

Why does this occur?

The cluster’s configuration is not optimal if you have nodes carrying master roles that are not one of the 3 dedicated master nodes. Having dedicated master nodes is crucial for the stability and performance of the Elasticsearch cluster. If other nodes also carry the master role, it can lead to potential issues and inefficiencies.

Possible impact and consequences of

The possible impact of this includes:

  1. Performance degradation: Nodes with multiple roles can become resource-constrained, leading to slower response times and reduced throughput.
  2. Increased risk of cluster instability: If a node with a master role fails, it can cause disruptions in the cluster’s operation.
  3. Difficulty in troubleshooting: Having multiple nodes with master roles can make it challenging to identify the root cause of issues in the cluster.

How to resolve

To achieve the optimal master node configuration, follow these steps according to your needs:

1. Add more dedicated master nodes: It is recommended to add as many dedicated master nodes, so that in total there are three dedicated master nodes. To add a dedicated master node, update the `elasticsearch.yml` configuration file on the new node with the following settings:

   node.master: true
   node.data: false
   node.ingest: false

   Then, restart the Elasticsearch service on the new node.

2. Remove the master role from all other nodes that are not dedicated master nodes: Update the `elasticsearch.yml` configuration file on each of these nodes with the following settings:

   node.master: false

   Restart the Elasticsearch service on each of these nodes after updating the configuration.


3. Monitor the cluster health and performance: After making the changes, monitor the cluster’s health using the `_cluster/health` API endpoint and check for improvements in performance and stability. If you are using Opster AutoOps, you can simply turn to the Cluster View dashboard to see the new events related to cluster health.

 GET /_cluster/health

Conclusion 

By following these steps, you can resolve the “Move to dedicated master nodes” issue and improve the stability and performance of your Elasticsearch cluster.

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?