Adding a new nodes in my cluster

Hello,

I've allready look in the doc or in differents topics but can't find the exact answer of my question :disappointed_relieved:

So here is my question :
I've an up and running cluster, in which I want to add a new node.

So the config file for the new node will have this parameters :

cluster.name: CLUSTER1
node.name: NODE5
...
discovery.zen.ping.unicast.hosts: ["NODE1", "NODE2", "NODE3, NODE4"]
discovery.zen.minimum_master_nodes: 2
...

This new node will be aware of all the others.

However, in the config files of the nodes (NODE1-4), the discovery.zen.* parameters are differents.
Indeed there is not the NODE5 in the hosts.

Is it necessary to stop each node one by one, change the config file and then reboot them ?

Another question about discovery.zen.minimum_master_nodes, is it necessary to change it from to 3 ? and is it also necessary to change it on every others nodes ?

Regards

If you have four master-eligible nodes in your cluster then discovery.zen.minimum_master_nodes should already be 3. You can update it dynamically:

PUT _cluster/settings
{"persistent":{"discovery.zen.minimum_master_nodes":3}}

Then you should update it on all the nodes too, but there is no need to restart them since they will use the value set through the API until they are restarted. Alternatively, three master-eligible nodes is normally enough, so perhaps you should set node.master: false on two of your five nodes, and leave discovery.zen.minimum_master_nodes: 2.

Then note that you only need to put the master-eligible nodes in discovery.zen.ping.unicast.hosts, so there's no need to adjust it on the other nodes.

1 Like

Indeed, that sounds better.

Ok thank you.
What if a non-eligible node is added in the unicats.hosts list ?

It's no big deal, it's just unnecessary. Typically people have a fairly fixed set of master-eligible nodes and a more fluid set of data nodes that grow and shrink as the cluster evolves, and there's no need to keep everyone's unicast.hosts list up to date with all the data nodes.

1 Like

Just to be sure :

Is it necessary to declare all master-eligible nodes in discovery.zen.ping.unicast.hosts on a master-eligible node ?

Example :

I've three nodes NODE1/2/3, all could be master.
What is the correct config for NODE1 for example :

discovery.zen.ping.unicast.hosts: ["NODE1", "NODE2", "NODE3"]

Or

discovery.zen.ping.unicast.hosts: ["NODE2", "NODE3"]

Thanx :blush:

Either is fine. I typically put them all in, because then I can see at a glance that the setting is correct without having to worry about which config file comes from which node, but adding the local node is a no-op and you can omit it if it suits you.

1 Like

Ok thank you.
Talking about all of this raises others questions.

Am I right by saying that :

A coordinating node (or anything else) is discovered during the discovery phase by sending requests/packets/something to the nodes it finds in his discovery.zen.ping.unicast.hosts parameter ?

Yes, pretty much. The masters all have to find each other to hold an election and to form themselves into a cluster, and then all the other nodes connect to the elected master to join the cluster.

One tiny point that might just be grammar:

... a node is discovered ...

It's perhaps better to think that each (master-ineligible) node is actively trying to discover the master, rather than passively being discovered by the master.

1 Like

Yeah, that's what I tried to say by sending requests/packets/something to the nodes it finds in his discovery.zen.ping.unicast.hosts parameter ?

Thanks a lot

1 Like

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