Why do you write cluster.initial_master_node 3 or higher node when setting up a cluster?

hi. i have a question..

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

Assuming that I wrote

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 :disappointed_relieved:

My enviroment is elasticsearch 7.6.1

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

First, this page 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 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.

thank you david!

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

like this

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

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

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!

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.

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.

Thank you David!!!

Have a nice day :smiling_face_with_three_hearts: