# Configuration 4 nodes witch defining the roles

**URL:** <https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 9:33am UTC](https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852 "2017-11-23T09:33:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RafaelPosthaus](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@RafaelPosthaus](https://discuss.elastic.co/u/RafaelPosthaus)\
**Post date:** [November 23, 2017, 9:33am UTC](https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852/1 "2017-11-23T09:33:13Z")

</div>

Good morning, I have a cluster elaticsearch, 2.4.2, with the 4 nodes having the same hardware.  
is configured as follows:  
1 node Data = false and master = true  
1 node Data = true and master = true  
2 nodes Data = true and master = false

for example at this moment the master elected by the cluster is one of the machines that is configured as Data = true and master = true

so the machine that should be master master = true and data = false ends up having no use.

Could you help me, or suggest any configuration changes?

thankful

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [November 23, 2017, 9:50am UTC](https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852/2 "2017-11-23T09:50:47Z")

</div>

You should have at least 3 master nodes.

But in your case, I'd probably just use the defaults values (master: true, data: true) and I would not use the node "1 node Data = false and master = true". This one looks useless to me.

---

<div class="post-metadata">

**Author:** ![poojagupta](https://avatars.discourse-cdn.com/v4/letter/p/5daacb/32.png) [@poojagupta](https://discuss.elastic.co/u/poojagupta)\
**Post date:** [November 23, 2017, 9:53am UTC](https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852/3 "2017-11-23T09:53:40Z")

</div>

with 4 more nodes set up and avoiding "split brain" problem mention the no. of master node as  
discovery.zen.minimum\_master\_nodes in configuration file of elastic search.  
Also for 4 node set up it is better to use no of master node is 3.  
you can calculate the best no. of master node in your set up via following formula : N/2+1  
for you configuration it is good to mention "discovery.zen.minimum\_master\_nodes:3"

---

<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:** [December 21, 2017, 9:54am UTC](https://discuss.elastic.co/t/configuration-4-nodes-witch-defining-the-roles/108852/4 "2017-12-21T09:54:09Z")

</div>

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