# Minimum master nodes in ES cluster

**URL:** <https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283>\
**Category:** Elasticsearch\
**Created:** [October 21, 2018, 11:50am UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283 "2018-10-21T11:50:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [October 21, 2018, 11:50am UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/1 "2018-10-21T11:50:33Z")

</div>

I have a ES cluster with nodes across data-centres with 1 coordinator node and 3 master+data nodes in each DC.

I have 2 questions here:

1. Is it any harm in using nodes which are acting as both master and data?
2. For minimum number of master nodes, as per the rule i should be mentioning 4 as min no. of nodes, but in that case, if in case something happens to one of the DCs, my cluster wont come back up. What is the suggested way to handle this scenario?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 21, 2018, 12:09pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/2 "2018-10-21T12:09:41Z")

</div>

Unless the connection between the two data centres has very good throughput and very low latency, this type of deployment is not recommended as Elasticsearch requires good and reliable connections within a cluster.

> [@Rupesh\_Ranjan](#):
>
> For minimum number of master nodes, as per the rule i should be mentioning 4 as min no. of nodes, but in that case, if in case something happens to one of the DCs, my cluster wont come back up. What is the suggested way to handle this scenario?

With just two data centres, you can not configure a symmetrically highly available cluster where Elasticsearch will continue operating when any of the data centres is lost. To get this you will need a third DC.

> [@Rupesh\_Ranjan](#):
>
> Is it any harm in using nodes which are acting as both master and data?

This works for many scenarios, but can cause problems if the nodes come under high load, in which case dedicated master nodes that do not serve traffic is useful.

---

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [October 21, 2018, 12:46pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/3 "2018-10-21T12:46:27Z")

</div>

Thanks, christian.

Can you please elaborate more on

> [@Christian\_Dahlqvist](#):
>
> dedicated master nodes that do not serve traffic

what kind of traffic are you mentioning here? Read or write? And is that by default for a dedicated master node?  
Just to add, I am using coordinate node to call ES APIs wherever required.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 21, 2018, 1:10pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/4 "2018-10-21T13:10:28Z")

</div>

Dedicated master nodes should ideally be left to just monitor the cluster. This means that they do not serve read or write traffic and can be much smaller than the data nodes.

---

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [October 21, 2018, 1:23pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/5 "2018-10-21T13:23:56Z")

</div>

Unfortunately, i dont have luxury of adding a third datacenter, so i'll have to live with 2 DCs. I understand the risk that either i can avoid split brain, or provide safety from datacenter failures.

So, this is what i am planning to keep  
DC-1 : 1 coordinate, 1 master+data, 1 dedicated master, 2 dedicated data  
DC-2 : 1 coordinate, 1 dedicated master, 3 dedicated data  
min no. of master eligible nodes: 2  
And, use coordinate nodes to communicate to cluster

With this config, is it too many a dedicated master nodes?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 21, 2018, 1:39pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/6 "2018-10-21T13:39:44Z")

</div>

No that seems like a good number as you almost always want to have 3 master-eligible nodes.

---

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [October 21, 2018, 1:46pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/7 "2018-10-21T13:46:05Z")

</div>

Since, there can be only one master at a time, and lets say the node which is master+data, get elected as master. In that case, can i still have issues if there is load, because as you mentioned if the nodes come under high load, dedicated master nodes are helpful.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 21, 2018, 1:47pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/8 "2018-10-21T13:47:14Z")

</div>

You could, but if you do it is likely one of the dedicated master nodes may get elected.

---

<div class="post-metadata">

**Author:** ![Rupesh\_Ranjan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rupesh_ranjan/32/22283_2.png) [@Rupesh\_Ranjan](https://discuss.elastic.co/u/Rupesh_Ranjan)\
**Post date:** [October 21, 2018, 1:48pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/9 "2018-10-21T13:48:13Z")

</div>

Terrific. Thanks a lot, it helps 🙂

---

<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:** [November 18, 2018, 1:54pm UTC](https://discuss.elastic.co/t/minimum-master-nodes-in-es-cluster/153283/10 "2018-11-18T13:54:26Z")

</div>

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