# Recommended number of master eligible nodes in a cluster

**URL:** https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627
**Category:** Elasticsearch
**Created:** [January 14, 2015, 8:38am UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627 "2015-01-14T08:38:01Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Darshat\_Shah](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Darshat\_Shah](https://discuss.elastic.co/u/Darshat_Shah)
#### Post date: [January 14, 2015, 8:38am UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/1 "2015-01-14T08:38:01Z")

</div>

Hi,  
What is the guideline on recommended number of master eligible nodes in a  
cluster?

We have a big cluster with 90+ nodes, currently all are eligible to be  
masters. However I do see master election take very long after a cluster  
restart - most nodes are still trying to ping the old master and I think  
there is no way to force a re-election.

Will re-election be faster if number of master eligible nodes be less? Is  
there a rule of thumb, given N nodes how many should we configure to be  
eligible to be masters?

Thanks  
Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c573961b-29eb-45e8-a5f5-9b31175efb46%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c573961b-29eb-45e8-a5f5-9b31175efb46%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)
#### Post date: [January 14, 2015, 8:46am UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/2 "2015-01-14T08:46:27Z")

</div>

The formula is N/2+1, so in your case that would be 46 if there are 90  
nodes.

/JZ

On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:

> Hi,  
> What is the guideline on recommended number of master eligible nodes in a  
> cluster?
> 
> We have a big cluster with 90+ nodes, currently all are eligible to be  
> masters. However I do see master election take very long after a cluster  
> restart - most nodes are still trying to ping the old master and I think  
> there is no way to force a re-election.
> 
> Will re-election be faster if number of master eligible nodes be less? Is  
> there a rule of thumb, given N nodes how many should we configure to be  
> eligible to be masters?
> 
> Thanks  
> Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c2a88fd9-209b-4e7e-bbfe-03c8cb5e82a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c2a88fd9-209b-4e7e-bbfe-03c8cb5e82a6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Darshat\_Shah](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Darshat\_Shah](https://discuss.elastic.co/u/Darshat_Shah)
#### Post date: [January 14, 2015, 8:54am UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/3 "2015-01-14T08:54:28Z")

</div>

That's the minimum number. Is it recommended to have more, or will  
elections take longer if we have more than this minimum?

On Wednesday, January 14, 2015 at 2:16:27 PM UTC+5:30, drjz wrote:

> The formula is N/2+1, so in your case that would be 46 if there are 90  
> nodes.
> 
> /JZ
> 
> On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:
> 
> > Hi,  
> > What is the guideline on recommended number of master eligible nodes in a  
> > cluster?
> > 
> > We have a big cluster with 90+ nodes, currently all are eligible to be  
> > masters. However I do see master election take very long after a cluster  
> > restart - most nodes are still trying to ping the old master and I think  
> > there is no way to force a re-election.
> > 
> > Will re-election be faster if number of master eligible nodes be less? Is  
> > there a rule of thumb, given N nodes how many should we configure to be  
> > eligible to be masters?
> > 
> > Thanks  
> > Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/c73fdcf8-e5c1-42ef-82f3-0e0d4f897cf0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/c73fdcf8-e5c1-42ef-82f3-0e0d4f897cf0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Darshat\_Shah](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Darshat\_Shah](https://discuss.elastic.co/u/Darshat_Shah)
#### Post date: [January 14, 2015, 9:39am UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/4 "2015-01-14T09:39:47Z")

</div>

To clarify, the guideline I'm looking for is how many nodes to set apart as  
dedicated to be master eligible in a cluster of size N. That is not N/2+1.

On Wednesday, January 14, 2015 at 2:24:29 PM UTC+5:30, Darshat Shah wrote:

> That's the minimum number. Is it recommended to have more, or will  
> elections take longer if we have more than this minimum?
> 
> On Wednesday, January 14, 2015 at 2:16:27 PM UTC+5:30, drjz wrote:
> 
> > The formula is N/2+1, so in your case that would be 46 if there are 90  
> > nodes.
> > 
> > /JZ
> > 
> > On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:
> > 
> > > Hi,  
> > > What is the guideline on recommended number of master eligible nodes in  
> > > a cluster?
> > > 
> > > We have a big cluster with 90+ nodes, currently all are eligible to be  
> > > masters. However I do see master election take very long after a cluster  
> > > restart - most nodes are still trying to ping the old master and I think  
> > > there is no way to force a re-election.
> > > 
> > > Will re-election be faster if number of master eligible nodes be less?  
> > > Is there a rule of thumb, given N nodes how many should we configure to be  
> > > eligible to be masters?
> > > 
> > > Thanks  
> > > Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e8e6dd50-203f-4ce7-9c78-3a989c526af6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e8e6dd50-203f-4ce7-9c78-3a989c526af6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Mark\_Harwood\_2](https://avatars.discourse-cdn.com/v4/letter/m/c77e96/32.png) [@Mark\_Harwood\_2](https://discuss.elastic.co/u/Mark_Harwood_2)
#### Post date: [January 14, 2015, 12:17pm UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/5 "2015-01-14T12:17:33Z")

</div>

For installations like yours we would recommend 3 master eligible nodes.  
This number doesn't need to scale with data volumes as your data nodes do.

A master eligible node should also be dedicated to that task alone - trying  
to also fulfil search or indexing activities puts them at the risk of  
becoming unresponsive.  
We recommend 3 master-eligible nodes because that gives you both a  
resiliency to failure and a necessary quorum required to avoid split-brain.  
Fortunately master nodes can be lighter-weight machines than those  
dedicated to search.

Anything less than 3 dedicated master-eligible nodes is essentially an  
architectural compromise made for smaller-budget configurations.

On Wednesday, January 14, 2015 at 9:39:47 AM UTC, Darshat Shah wrote:

> To clarify, the guideline I'm looking for is how many nodes to set apart  
> as dedicated to be master eligible in a cluster of size N. That is not  
> N/2+1.
> 
> On Wednesday, January 14, 2015 at 2:24:29 PM UTC+5:30, Darshat Shah wrote:
> 
> > That's the minimum number. Is it recommended to have more, or will  
> > elections take longer if we have more than this minimum?
> > 
> > On Wednesday, January 14, 2015 at 2:16:27 PM UTC+5:30, drjz wrote:
> > 
> > > The formula is N/2+1, so in your case that would be 46 if there are 90  
> > > nodes.
> > > 
> > > /JZ
> > > 
> > > On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:
> > > 
> > > > Hi,  
> > > > What is the guideline on recommended number of master eligible nodes in  
> > > > a cluster?
> > > > 
> > > > We have a big cluster with 90+ nodes, currently all are eligible to be  
> > > > masters. However I do see master election take very long after a cluster  
> > > > restart - most nodes are still trying to ping the old master and I think  
> > > > there is no way to force a re-election.
> > > > 
> > > > Will re-election be faster if number of master eligible nodes be less?  
> > > > Is there a rule of thumb, given N nodes how many should we configure to be  
> > > > eligible to be masters?
> > > > 
> > > > Thanks  
> > > > Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/0e1c31b3-7682-4009-bc79-b46a9c6cda2a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0e1c31b3-7682-4009-bc79-b46a9c6cda2a%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Ed\_Kim](https://avatars.discourse-cdn.com/v4/letter/e/53a042/32.png) [@Ed\_Kim](https://discuss.elastic.co/u/Ed_Kim)
#### Post date: [January 14, 2015, 7:22pm UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/6 "2015-01-14T19:22:58Z")

</div>

3 should be fine, and they don't even have to be beefy machines.

On Wednesday, January 14, 2015 at 1:39:47 AM UTC-8, Darshat Shah wrote:

> To clarify, the guideline I'm looking for is how many nodes to set apart  
> as dedicated to be master eligible in a cluster of size N. That is not  
> N/2+1.
> 
> On Wednesday, January 14, 2015 at 2:24:29 PM UTC+5:30, Darshat Shah wrote:
> 
> > That's the minimum number. Is it recommended to have more, or will  
> > elections take longer if we have more than this minimum?
> > 
> > On Wednesday, January 14, 2015 at 2:16:27 PM UTC+5:30, drjz wrote:
> > 
> > > The formula is N/2+1, so in your case that would be 46 if there are 90  
> > > nodes.
> > > 
> > > /JZ
> > > 
> > > On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:
> > > 
> > > > Hi,  
> > > > What is the guideline on recommended number of master eligible nodes in  
> > > > a cluster?
> > > > 
> > > > We have a big cluster with 90+ nodes, currently all are eligible to be  
> > > > masters. However I do see master election take very long after a cluster  
> > > > restart - most nodes are still trying to ping the old master and I think  
> > > > there is no way to force a re-election.
> > > > 
> > > > Will re-election be faster if number of master eligible nodes be less?  
> > > > Is there a rule of thumb, given N nodes how many should we configure to be  
> > > > eligible to be masters?
> > > > 
> > > > Thanks  
> > > > Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/bcec37c0-e62e-4475-9042-2f955c2f918e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/bcec37c0-e62e-4475-9042-2f955c2f918e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Matias\_Waisgold](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@Matias\_Waisgold](https://discuss.elastic.co/u/Matias_Waisgold)
#### Post date: [January 14, 2015, 7:35pm UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/7 "2015-01-14T19:35:32Z")

</div>

I´ve created a 200 nodes cluster and successed with 3 master\_eligible  
nodes. The important thing is that they have the data\_node setting in  
false, and data\_nodes have it the other way around. This will improve a lot  
your cluster resiliency.

On Wednesday, January 14, 2015 at 4:22:58 PM UTC-3, Ed Kim wrote:

> 3 should be fine, and they don't even have to be beefy machines.
> 
> On Wednesday, January 14, 2015 at 1:39:47 AM UTC-8, Darshat Shah wrote:
> 
> > To clarify, the guideline I'm looking for is how many nodes to set apart  
> > as dedicated to be master eligible in a cluster of size N. That is not  
> > N/2+1.
> > 
> > On Wednesday, January 14, 2015 at 2:24:29 PM UTC+5:30, Darshat Shah wrote:
> > 
> > > That's the minimum number. Is it recommended to have more, or will  
> > > elections take longer if we have more than this minimum?
> > > 
> > > On Wednesday, January 14, 2015 at 2:16:27 PM UTC+5:30, drjz wrote:
> > > 
> > > > The formula is N/2+1, so in your case that would be 46 if there are 90  
> > > > nodes.
> > > > 
> > > > /JZ
> > > > 
> > > > On Wednesday, January 14, 2015 at 9:38:01 AM UTC+1, Darshat Shah wrote:
> > > > 
> > > > > Hi,  
> > > > > What is the guideline on recommended number of master eligible nodes  
> > > > > in a cluster?
> > > > > 
> > > > > We have a big cluster with 90+ nodes, currently all are eligible to be  
> > > > > masters. However I do see master election take very long after a cluster  
> > > > > restart - most nodes are still trying to ping the old master and I think  
> > > > > there is no way to force a re-election.
> > > > > 
> > > > > Will re-election be faster if number of master eligible nodes be less?  
> > > > > Is there a rule of thumb, given N nodes how many should we configure to be  
> > > > > eligible to be masters?
> > > > > 
> > > > > Thanks  
> > > > > Darshat

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6d952146-4f2f-4c94-952e-dcc852f0be57%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d952146-4f2f-4c94-952e-dcc852f0be57%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![xavierfacq](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xavierfacq/32/8744_2.png) [@xavierfacq](https://discuss.elastic.co/u/xavierfacq)
#### Post date: [October 11, 2016, 8:23pm UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/8 "2016-10-11T20:23:16Z")

</div>

Hi,

@Matias_Waisgold : With your cluster of 200 nodes with 3 master\_eligble, does all nodes vote for the master election or only masters ? If only masters vote, what is the configuration of above parameters ?

discovery.zen.minimum\_master\_nodes: 2 ==\> I think yes , doc says : (3 / 2 + 1)

discovery.zen.master\_election.filter\_data = true (only master vote )

Thank you !

---

<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:13pm UTC](https://discuss.elastic.co/t/recommended-number-of-master-eligible-nodes-in-a-cluster/21627/9 "2017-07-05T22:13:16Z")

</div>


