# Introduction of dedicated master nodes

**URL:** <https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601>\
**Category:** Elasticsearch\
**Created:** [March 6, 2016, 4:49pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601 "2016-03-06T16:49:31Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 6, 2016, 4:49pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/1 "2016-03-06T16:49:31Z")

</div>

Hello,

As recommended, we want to make our cluster more stable by adding dedicated master nodes.  
Actualy, we have 5 nodes that do all data with only first 3 to be master eligible.

So, we have 3 new nodes that we want to dedicate to be master eligibles and do only that work.

Is there something important in making this work:

- shutdown cluster
- modify actual 5 nodes with master: false flag and data: true
- make 3 new nodes master:true and data: false
- modify all nodes to discover using 3 new master nodes addresses
- we can optionnally disable http port on master nodes to make them not receiving REST requests.
- start cluster

Is it that simple?  
Actual master don't store anything that the new one will need to be aware?

Thanks  
Bruno Lavoie

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 6, 2016, 6:07pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/2 "2016-03-06T18:07:47Z")

</div>

There's no need to shut down the cluster completely. Just spin up the new master-only nodes and make sure they join the cluster, then do a rolling restart of the old ones to change their configurations.

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 7, 2016, 12:11am UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/3 "2016-03-07T00:11:01Z")

</div>

Ok ,

With the new nodes with master : true, the number of master eligible is then bumped to a total of 6 while the original discovery.zen.minimum\_master\_nodes setting is 2.

Is there a chance to have a split brain or something like this? Should we change discovery.zen.minimum\_master\_nodes setting temporarily? When rolling restart, do we should restart current master first or last?

Thanks again

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 7, 2016, 1:42am UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/4 "2016-03-07T01:42:40Z")

</div>

I replied but not to you, I reply again just to be sure you'll be notified.  
Thanks

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [March 7, 2016, 7:08am UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/5 "2016-03-07T07:08:01Z")

</div>

> Is there a chance to have a split brain or something like this?

Ah, good point. Theoretically yes, for exactly the reason you mention.

> When rolling restart, do we should restart current master first or last?

I'd say last so that you're guaranteed a single master reelection.

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [March 7, 2016, 2:31pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/6 "2016-03-07T14:31:05Z")

</div>

Hello Magnus,

Ok, so good... I think I have a minimum understanding of ES. 🙂

And to be safe, I'll also adjust minimum\_master\_nodes transient setting while adding and removing nodes.

Again, thanks for your help.

---

<div class="post-metadata">

**Author:** ![Marjana](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Marjana](https://discuss.elastic.co/u/Marjana)\
**Post date:** [June 6, 2016, 1:33pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/7 "2016-06-06T13:33:25Z")

</div>

Hi Bruno,  
I need to do the same thing as you. I have 2 data/master nodes and trying to add 3 master nodes. Master\_min\_nodes is 3. When I start new masters, they don't join existing cluster. Only when I restart 2 master/data nodes, they join the 3 master node cluster. Did you have such problem? Your new master nodes joining your original cluster?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [June 6, 2016, 1:57pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/8 "2016-06-06T13:57:01Z")

</div>

> [@Marjana](#):
>
> r nodes and trying to add 3 master nodes. Master\_min\_nodes is 3. When I start new masters, they don't join existing cluster. Only when I restart 2 master/data nodes, they join the 3 master node cluster. Did you have such problem? Your new master nodes joining your original cluster?

Not got such a problem... sorry...  
About you new nodes, not joining as master nodes, rather are they joining as another type node (client, data, ...)?

---

<div class="post-metadata">

**Author:** ![Marjana](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Marjana](https://discuss.elastic.co/u/Marjana)\
**Post date:** [June 6, 2016, 3:00pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/9 "2016-06-06T15:00:54Z")

</div>

They don't join the existing 2 node cluster. But rather, when I start 3 new master nodes, they form their own 3 master node cluster.

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [June 6, 2016, 6:25pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/10 "2016-06-06T18:25:02Z")

</div>

> [@Marjana](#):
>
> the existing 2 node

be sure that they are part of the same cluster (name) and that no firewalls blocking...

---

<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:** [June 6, 2016, 6:27pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/11 "2016-06-06T18:27:57Z")

</div>

Do the new master nodes have the IP addresses of the old nodes in their unicast configuration? Are all nodes on the same version of Elasticsearch?

---

<div class="post-metadata">

**Author:** ![Marjana](https://avatars.discourse-cdn.com/v4/letter/m/6a8cbe/32.png) [@Marjana](https://discuss.elastic.co/u/Marjana)\
**Post date:** [June 6, 2016, 6:39pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/12 "2016-06-06T18:39:51Z")

</div>

They all have the same discovery.zen.ping.unicast.hosts. It is the list of all 5 nodes (2 original plus 3 new master nodes). They are all on the same version. My issue is that new master nodes are not joining existing cluster. If I shutdown 2 node original cluster and restart, it does join the 3 master node cluster. Why it doesn't work the other way, beats me. I have different issues I run into when my 2 original nodes join 3 master node (created a topic here but no answers yet on that one).

On my 3 new masters, I set:  
gateway.expected\_master\_nodes: 3  
gateway.minimum\_master\_nodes: 2  
gateway.expected\_nodes: 5

On my original 2 node cluster, I have:  
gateway.expected\_nodes: 2  
gateway.expected\_master\_nodes: 3

---

<div class="post-metadata">

**Author:** ![Bruno\_Lavoie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruno_lavoie/32/8408_2.png) [@Bruno\_Lavoie](https://discuss.elastic.co/u/Bruno_Lavoie)\
**Post date:** [June 7, 2016, 2:53am UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/13 "2016-06-07T02:53:21Z")

</div>

Very, very good point!

> [@Christian\_Dahlqvist](#):
>
> Do the new master nodes have the IP addresses of the old nodes in their unicast configuration? Are all nodes on the same version of Elasticsearch?

---

<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:** [July 5, 2017, 10:45pm UTC](https://discuss.elastic.co/t/introduction-of-dedicated-master-nodes/43601/14 "2017-07-05T22:45:49Z")

</div>


