# Elasticsearch | 3 master/data nodes vs 1 master and 2 data nodes

**URL:** <https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768>\
**Category:** Elasticsearch\
**Created:** [February 25, 2019, 8:17am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768 "2019-02-25T08:17:48Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 8:17am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/1 "2019-02-25T08:17:48Z")

</div>

Hi,

I was wondering what would be the advantages and disadvantages of using a single cluster with 3 data/master nodes and one dedicated master and two data nodes?  
Will there be any effect on Cluster performance, stability, JVM Heap and other aspects?

---

<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:** [February 25, 2019, 8:42am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/2 "2019-02-25T08:42:56Z")

</div>

If you have one (or two) master-eligible nodes then your cluster is not resilient to the loss of a master-eligible node: if a master-eligible node fails, or you need to take it down for maintenance, then the whole cluster will become unavailable until the lost node is restored. If you have three or more master-eligible nodes then this is no longer true: the cluster can still elect a master and carry on working even if one of the nodes is lost.

Conversely, if the elected master is a data node then it must also perform searches and indexing which might mean it does not have the resources needed to properly do its duties as the elected master, which could hamper other operations in the cluster that require coordination with the master (index creation, mapping updates, etc).

I generally think the first point is more important and would generally recommend to prioritise having three master-eligible nodes first, even if some of them are mixed master/data nodes.

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 10:45am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/3 "2019-02-25T10:45:26Z")

</div>

Thanks David for your quick response!  
As per your suggestion, I would like to go with 3 master eligible nodes.  
How about this approach, Since I have 3 node cluster, I would choose **one node** to be **dedicated master** and the other **two nodes** to be **master eligible data nodes**.  
Do you see any drawbacks in this approach?

---

<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:** [February 25, 2019, 11:04am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/4 "2019-02-25T11:04:59Z")

</div>

Seems like a good plan to me.

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 11:17am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/5 "2019-02-25T11:17:05Z")

</div>

Great!  
Thanks for your quick suggestion David!

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 11:42am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/6 "2019-02-25T11:42:28Z")

</div>

Hi @DavidTurner  
In the similar context, when I have 3 node cluster.  
Let's say, Node A is dedicated master, Node B and C are master eligible data nodes.  
If by any chance, Node A goes down, Node B or C would become a master (Let's say Node B).  
Once Node A comes back to join the cluster, Since now Node B is a master, Node A cannot be a master. This would mean Node A is of no use after this point as this is neither master nor can hold any data in it.  
This would also mean, more load on Node B as it has to perform both master and data related tasks  
Is my assumption of Node A being of no use correct?

---

<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:** [February 25, 2019, 12:36pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/7 "2019-02-25T12:36:34Z")

</div>

> [@Nikesh](#):
>
> Is my assumption of Node A being of no use correct?

Without it, if node B or node C were to fail then your cluster would be unavailable, so I don't think I'd say it is "of no use".

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 12:39pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/8 "2019-02-25T12:39:20Z")

</div>

Thanks David for the response.  
Is there a way to prioritize Node A to become the master node when it rejoins the Cluster over Node B?

---

<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:** [February 25, 2019, 1:29pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/9 "2019-02-25T13:29:39Z")

</div>

No, there's no need for that, because each master-eligible node must be able to assume the burden of being the master at any time. If the mixed data/master nodes are running close to the limit then you should move to a configuration with three dedicated master nodes.

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 25, 2019, 1:40pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/10 "2019-02-25T13:40:28Z")

</div>

Okay!

> [@DavidTurner](#):
>
> mixed data/master nodes are running close to the limit

By this do you mean making a node mixed data/master node, might take additional burden that can lead to issues like JVM Heap?

---

<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:** [February 25, 2019, 2:03pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/11 "2019-02-25T14:03:41Z")

</div>

The master does do a bit more work, yes. It's normally not a lot as long as your cluster is reasonable (not too many shards etc.).

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 26, 2019, 7:08am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/12 "2019-02-26T07:08:09Z")

</div>

Thanks David for the response.

> [@DavidTurner](#):
>
> The master does do a bit more work

Can you mention few that can increase Memory?

---

<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:** [February 26, 2019, 8:26am UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/13 "2019-02-26T08:26:04Z")

</div>

Sorry I don't really understand the question.

---

<div class="post-metadata">

**Author:** ![Nikesh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nikesh/32/86579_2.png) [@Nikesh](https://discuss.elastic.co/u/Nikesh)\
**Post date:** [February 26, 2019, 2:31pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/14 "2019-02-26T14:31:43Z")

</div>

I meant what works that master does that can increase Memory?

---

<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:** [February 26, 2019, 3:44pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/15 "2019-02-26T15:44:23Z")

</div>

Being the master node takes a bit of extra resources (some heap, some CPU, some network bandwidth, etc). It's normally not a lot, but if you need to know precisely how much you will need to measure this in your own environment, since it depends very much on how your cluster is set up.

---

<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:** [March 26, 2019, 3:44pm UTC](https://discuss.elastic.co/t/elasticsearch-3-master-data-nodes-vs-1-master-and-2-data-nodes/169768/16 "2019-03-26T15:44:25Z")

</div>

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