# Adding a new nodes in my cluster

**URL:** <https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564>\
**Category:** Elasticsearch\
**Created:** [February 15, 2019, 10:30am UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564 "2019-02-15T10:30:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dihpierrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dihpierrick/32/40980_2.png) [@dihpierrick](https://discuss.elastic.co/u/dihpierrick)\
**Post date:** [February 15, 2019, 10:30am UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/1 "2019-02-15T10:30:55Z")

</div>

Hello,

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

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

---

<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:** [February 15, 2019, 11:54am UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/2 "2019-02-15T11:54:46Z")

</div>

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:

```nohighlight
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.

---

<div class="post-metadata">

**Author:** ![dihpierrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dihpierrick/32/40980_2.png) [@dihpierrick](https://discuss.elastic.co/u/dihpierrick)\
**Post date:** [February 15, 2019, 12:25pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/3 "2019-02-15T12:25:59Z")

</div>

> [@DavidTurner](#):
>
> 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` .

Indeed, that sounds better.

> [@DavidTurner](#):
>
> 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.

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

---

<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:** [February 15, 2019, 3:02pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/4 "2019-02-15T15:02:10Z")

</div>

> [@dihpierrick](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![dihpierrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dihpierrick/32/40980_2.png) [@dihpierrick](https://discuss.elastic.co/u/dihpierrick)\
**Post date:** [February 18, 2019, 1:17pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/5 "2019-02-18T13:17:10Z")

</div>

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 😊

---

<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:** [February 18, 2019, 1:53pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/6 "2019-02-18T13:53:12Z")

</div>

> [@dihpierrick](#):
>
> What is the correct config for NODE1 for example :

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.

---

<div class="post-metadata">

**Author:** ![dihpierrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dihpierrick/32/40980_2.png) [@dihpierrick](https://discuss.elastic.co/u/dihpierrick)\
**Post date:** [February 18, 2019, 4:01pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/7 "2019-02-18T16:01:37Z")

</div>

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 ?

---

<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:** [February 18, 2019, 4:14pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/8 "2019-02-18T16:14:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dihpierrick](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dihpierrick/32/40980_2.png) [@dihpierrick](https://discuss.elastic.co/u/dihpierrick)\
**Post date:** [February 18, 2019, 4:18pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/9 "2019-02-18T16:18:52Z")

</div>

> [@DavidTurner](#):
>
> 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.

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

---

<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:** [March 18, 2019, 4:25pm UTC](https://discuss.elastic.co/t/adding-a-new-nodes-in-my-cluster/168564/10 "2019-03-18T16:25:46Z")

</div>

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