# How to set minimum master node in elasticsearch.yml file?

**URL:** <https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721>\
**Category:** Elasticsearch\
**Created:** [September 21, 2015, 5:27pm UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721 "2015-09-21T17:27:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [September 21, 2015, 5:27pm UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/1 "2015-09-21T17:27:45Z")

</div>

Running ElasticSearch 1.7 along with Java 7..

So I have a one cluster node with three system and each contains 1 master node,1 data node & 1 client node.

Totally, we will have 9 eligible nodes

My Question is.

How to set **minimum master nodes** in elasticsearch.yml?

**discovery.zen.minimum\_master\_nodes** = **?**

**No.of master nodes= No. of nodes/2+1**

**number of nodes** represent which node?

Thanks,  
Ganesh

---

<div class="post-metadata">

**Author:** ![msimos](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@msimos](https://discuss.elastic.co/u/msimos)\
**Post date:** [September 21, 2015, 6:31pm UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/2 "2015-09-21T18:31:36Z")

</div>

Hi,

Are you saying you have 3 separate cluster? Each has 1 master node, 1 data node and 1 client node? Sorry I am not sure what your configuration is. For "No. of nodes" the only nodes you need to consider is any node which has "node.master: true".

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [September 22, 2015, 4:29am UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/3 "2015-09-22T04:29:49Z")

</div>

Hi Mike,

No I have only one cluster and has nine nodes.

The formula to calculate no of minimum master nodes is = (no.of nodes/2+1).

My Question is  
1.while calculating whether I should consider no of nodes as master, data, client or all nodes in the cluster.  
2. How to set and calculate minimum master nodes value in elasticsearch.yml?

Thanks,  
Ganesh

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 22, 2015, 5:35am UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/4 "2015-09-22T05:35:35Z")

</div>

In the _N_/2+1 formula, _N_ denotes the number of master-eligible nodes. In your case _N_=1, hence:

```
discovery.zen.minimum_master_nodes: 1
```

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [September 22, 2015, 9:15am UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/5 "2015-09-22T09:15:21Z")

</div>

Thanks for your response.

To set the problem statement right, we have 3 Physical Servers.

Our plan is to setup  
a. 3 Master Nodes (1 in each server)  
b 3 Client Nodes (1 in each server)  
c. 3 Data Nodes (1 in each server)

So, in total, we are planning to have 9 Nodes running from 3 Physical Servers.

Going by the formula, if we consider N as the number of master-eligible nodes (which is 3, in our case),  
discovery.zen.minimum\_master\_nodes: 3/2+1 = 2

Is this a right setting?

Regards,  
Ganesh

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 22, 2015, 9:45am UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/6 "2015-09-22T09:45:55Z")

</div>

And this is the same cluster? Yes, then you have three master-eligible nodes and consequently minimum\_master\_nodes should be set to two.

Unless these physical servers are very well equipped (e.g. \>64 GB RAM) I suspect it's a mistake to run as many ES instances as you're planning.

---

<div class="post-metadata">

**Author:** ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)\
**Post date:** [September 22, 2015, 9:52am UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/7 "2015-09-22T09:52:30Z")

</div>

Yes, ours is highly configured servers with RAM \> 64 GB.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:48pm UTC](https://discuss.elastic.co/t/how-to-set-minimum-master-node-in-elasticsearch-yml-file/29721/8 "2017-07-05T23:48:49Z")

</div>


