# How to settings a elasticsearch cluster correctly

**URL:** <https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500>\
**Category:** Elasticsearch\
**Created:** [September 14, 2020, 9:20am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500 "2020-09-14T09:20:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)\
**Post date:** [September 14, 2020, 9:20am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/1 "2020-09-14T09:20:53Z")

</div>

Hello!  
According to the terms of reference, I have to set up a cluster of five nodes.

I have a number of questions.

1. Can I specify one of the nodes simultaneously as a master node and as a data node?

2. If I specified one master node (coordinator), what happens if it fails? Will other nodes choose a new coordinator? How to properly configure the nodes so that when the coordinator fails, they choose a new one from the remaining four nodes?

---

<div class="post-metadata">

**Author:** ![ylasri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ylasri/32/86120_2.png) [@ylasri](https://discuss.elastic.co/u/ylasri)\
**Post date:** [September 14, 2020, 9:22am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/2 "2020-09-14T09:22:37Z")

</div>

You can have 3 nodes as master & data

---

<div class="post-metadata">

**Author:** ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)\
**Post date:** [September 14, 2020, 9:33am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/3 "2020-09-14T09:33:07Z")

</div>

Okay, I'm just worried that if one of the three masters fails, then a situation might occur: Split brain. Am I correct in understanding that when two masters work, this can happen? If so, how can this situation be avoided?

---

<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:** [September 14, 2020, 9:34am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/4 "2020-09-14T09:34:53Z")

</div>

Three master eligible nodes protect you from split brain scenarios.

---

<div class="post-metadata">

**Author:** ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)\
**Post date:** [September 14, 2020, 9:38am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/6 "2020-09-14T09:38:17Z")

</div>

I understand, but if one of the three fails, what then?

---

<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:** [September 14, 2020, 9:51am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/7 "2020-09-14T09:51:37Z")

</div>

Then the remaining two can still form a majority until the failed node returns.

---

<div class="post-metadata">

**Author:** ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)\
**Post date:** [September 14, 2020, 10:45am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/8 "2020-09-14T10:45:34Z")

</div>

Well thank you!  
I found the information I needed:  
In Elasticsearch, setting node.master: true does not mean that this node is a master, it just says that it can be selected as a master node.

Is it really so?

---

<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:** [September 14, 2020, 10:49am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/9 "2020-09-14T10:49:20Z")

</div>

Yes. Each cluster only has one master node at any time but this need to be able to change if you want HA which is why you need 3 or more master eligible nodes.

---

<div class="post-metadata">

**Author:** ![djuwa4](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@djuwa4](https://discuss.elastic.co/u/djuwa4)\
**Post date:** [September 14, 2020, 11:08am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/10 "2020-09-14T11:08:09Z")

</div>

Thank!

---

<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:** [October 12, 2020, 11:08am UTC](https://discuss.elastic.co/t/how-to-settings-a-elasticsearch-cluster-correctly/248500/11 "2020-10-12T11:08:18Z")

</div>

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