# Number of master nodes for a multi-node cluster

**URL:** <https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310>\
**Category:** Elasticsearch\
**Created:** [March 12, 2020, 10:25am UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310 "2020-03-12T10:25:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jkhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkhere/32/73292_2.png) [@jkhere](https://discuss.elastic.co/u/jkhere)\
**Post date:** [March 12, 2020, 10:25am UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/1 "2020-03-12T10:25:14Z")

</div>

Hi,

I am planning to set up an elasticsearch cluster of around 160 nodes. As I have read in the documentation and some other forum posts, I need to set up dedicated master nodes and data nodes. The cluster will be Index heavy ( daily 5 million + documents updated) and 200,000 searches made against it.

I read in a post that the number of minimum master node required can be determined based on the below formula.

`N <= 2 ? 1 : floor(N/2)+1 rule`  
( N - number of nodes in the cluster)

In my case, N = 160, so is minimum master nodes is 81 . Am i correct ? I was thinking of setting up on 3 Master nodes and rest of them as data nodes.

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [March 12, 2020, 11:41am UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/2 "2020-03-12T11:41:40Z")

</div>

@jkhere,

> [@jkhere](#):
>
> I am planning to set up an elasticsearch cluster of around 160 nodes.

Are you want to use 160 servers in elasticsaerch cluster or 160 are the servers which will send the logs to ELK?

> [@jkhere](#):
>
> (N/2)+1 rule

Yes..this is the rule to set the minimum master node in a cluster. Your node should be in odd number like 3,5 etc.

Please refer the below link it may help you:

[https://qbox.io/blog/split-brain-problem-elasticsearch](https://qbox.io/blog/split-brain-problem-elasticsearch)

Thanks.

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 12, 2020, 11:50am UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/3 "2020-03-12T11:50:25Z")

</div>

> [@jkhere](#):
>
> I read in a post that the number of minimum master node required can be determined based on the below formula.

I think you're misunderstanding what you've read. This formula is for the `discovery.zen.minimum_master_nodes` setting, where `N` is the total number of **master-eligible** nodes in your cluster. `N` should be much smaller than 160, and normally 3 is the right number.

Furthermore this setting is deprecated and ignored in Elasticsearch 7 so this formula is not at all relevant any more.

> [@jkhere](#):
>
> I was thinking of setting up on 3 Master nodes and rest of them as data nodes.

Yes, do that.

---

<div class="post-metadata">

**Author:** ![jkhere](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkhere/32/73292_2.png) [@jkhere](https://discuss.elastic.co/u/jkhere)\
**Post date:** [March 12, 2020, 12:08pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/4 "2020-03-12T12:08:36Z")

</div>

> [@DavidTurner](#):
>
> Furthermore this setting is deprecated and ignored in Elasticsearch 7 so this formula is not at all relevant any more.

Thank you for the clarification. I just read the [elastic blog post](https://www.elastic.co/blog/a-new-era-for-cluster-coordination-in-elasticsearch) on verison 7 announcement. I understand that it has changed.

We don't have any plans for setting up machine learning jobs or data ingest pipeline. So those will be set as false. However we do have a large volume of searches and very few heavy searches. It does not involve any large aggregations or analytics. So do i need any dedicated coordinating nodes ? I believe data nodes will also be acting as coordinating nodes.

---

<div class="post-metadata">

**Author:** ![Tek\_Chand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tek_chand/32/34318_2.png) [@Tek\_Chand](https://discuss.elastic.co/u/Tek_Chand)\
**Post date:** [March 12, 2020, 12:45pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/5 "2020-03-12T12:45:02Z")

</div>

> [@DavidTurner](#):
>
> I think you're misunderstanding what you've read. This formula is for the `discovery.zen.minimum_master_nodes` setting, where `N` is the total number of **master-eligible** nodes in your cluster.

Ah..sorry..Thanks for correcting me..i came back here to correct myself but you already posted. Somehow i wrote that. Yes, `(N/2)+1 rule` is used to set `discovery.zen.minimum_master_nodes` to avoid split brain problem and master node should be in `odd number`.

Thanks.

---

<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:** [April 9, 2020, 12:45pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-for-a-multi-node-cluster/223310/6 "2020-04-09T12:45:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
