# Why do you write cluster.initial\_master\_node 3 or higher node when setting up a cluster?

**URL:** <https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884>\
**Category:** Elasticsearch\
**Created:** [March 17, 2020, 9:13am UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884 "2020-03-17T09:13:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cybang](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@cybang](https://discuss.elastic.co/u/cybang)\
**Post date:** [March 17, 2020, 9:13am UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/1 "2020-03-17T09:13:57Z")

</div>

hi. i have a question..

I apologize first if there is something I said rudely because I cant well english.

Assuming that I wrote

```auto
cluster.initial_master_node: master1,master2,master3

```

I need only two masters alive to maintain this cluster, right?

cluster.initial\_master\_node is declared as above, and if I am actually on the service of master 1, master2, master3, master4, master 5, then **at least '' two masters are alive'**', right?

Why do you write cluster.initial\_master\_node 3 or higher node???  
I don't know what's good about setting up three or more...plz know me 😥

My enviroment is elasticsearch 7.6.1

---

<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 17, 2020, 10:10am UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/2 "2020-03-17T10:10:29Z")

</div>

I don't completely understand your question, sorry, but will link to some docs that hopefully help.

First, [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-bootstrap-cluster.html) says the following:

> It is technically sufficient to set `cluster.initial_master_nodes` on a single master-eligible node in the cluster, and only to mention that single node in the setting’s value, but this provides no fault tolerance before the cluster has fully formed. It is therefore better to bootstrap using at least three master-eligible nodes, each with a `cluster.initial_master_nodes` setting containing all three nodes.

Second, [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/discovery-settings.html#initial_master_nodes) says the following:

> You should not use this setting when restarting a cluster or adding a new node to an existing cluster.

The `cluster.initial_master_nodes` setting is only needed the first time the cluster starts up. After that, you should remove it.

---

<div class="post-metadata">

**Author:** ![cybang](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@cybang](https://discuss.elastic.co/u/cybang)\
**Post date:** [March 17, 2020, 3:02pm UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/3 "2020-03-17T15:02:36Z")

</div>

thank you david!

I wonder what the advantages of specifying more than three nodes in that setup!

like this

```auto
cluster.initial_master_nodes: master1, master2, master3

```

For example, I first formed a cluster of three masters. Assuming that the service requires scale-up during operation so added two master servers

Since I declared three masters in the beginning, there will internally defined

```auto
discovery.zen.minimum_master_nodes: 2

```

right? This means that two additional masters I define are alive and master1, master2 is die, the service will be operational! because they are keeping three masters

The other way around!  
When I first formed a cluster of five masters  
there will internally defined

```auto
Discovery.zen.minimum_master_nodes: 3

```

right?

In the first example, there are two minimum master nodes, so it doesn't matter if three master servers die, but in the second example, if three masters die, the cluster fails!

Through these two differences, I wondered what is the advantage of declaring more than three in initial\_master\_nodes!

---

<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 17, 2020, 3:15pm UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/4 "2020-03-17T15:15:35Z")

</div>

> [@cybang](#):
>
> I wonder what the advantages of specifying more than three nodes in that setup!

I'm not sure what else to say apart from what I quoted before. Three nodes is better than one, for the reasons described above, but I don't think there's much practical advantage to using more than three.

> [@cybang](#):
>
> Since I declared three masters in the beginning, there will internally defined
> 
> ```auto
> discovery.zen.minimum_master_nodes: 2
> 
> ```

No, that's not really how it works. It's much more dynamic than that. If you have five master-eligible nodes then you can lose two, regardless of how you got there.

---

<div class="post-metadata">

**Author:** ![cybang](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@cybang](https://discuss.elastic.co/u/cybang)\
**Post date:** [March 18, 2020, 12:12am UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/5 "2020-03-18T00:12:42Z")

</div>

Thank you David!!!

Have a nice day 🥰

---

<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 15, 2020, 12:12am UTC](https://discuss.elastic.co/t/why-do-you-write-cluster-initial-master-node-3-or-higher-node-when-setting-up-a-cluster/223884/6 "2020-04-15T00:12:54Z")

</div>

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