# About Voting Only Nodes

**URL:** https://discuss.elastic.co/t/about-voting-only-nodes/313948
**Category:** Elasticsearch
**Created:** [September 8, 2022, 6:31am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948 "2022-09-08T06:31:46Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)
#### Post date: [September 8, 2022, 6:31am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/1 "2022-09-08T06:31:46Z")

</div>

Hi,  
With voting configurations is it recommended that, when needed, a minimum of nodes are voting-only? Or is it legitimate to make all nodes voting-only?

I ask because we have clusters whose topologies vary. For example, if we add make one of the tiers voting-only it could be that this tier isn't equal to the number of deployed masters, which is what we would prefer. The current structure of our deployment makes it impractical to assign "N" nodes to be voting only.

Thx  
D

---

<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: [September 8, 2022, 7:12am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/2 "2022-09-08T07:12:27Z")

</div>

You should IMHO have at most one voting-only node. Any other master nodes need to be master eligible so they can become master.

> [@dawiro](#):
>
> is it legitimate to make all nodes voting-only?

No. The voting-only node is as far as I know designed to be used as a single tie-breaker when you have a cluster deployed across 2 zones. If you have more than 2 zones I do not think you should use a voting-only node at all.

---

<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: [September 8, 2022, 7:36am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/3 "2022-09-08T07:36:28Z")

</div>

The docs describe the [recommended practice](https://www.elastic.co/guide/en/elasticsearch/reference/current/high-availability-cluster-small-clusters.html#high-availability-cluster-design-three-plus-nodes) here (supporting what Christian just said):

> However, it is good practice to limit the number of master-eligible nodes in the cluster to three. [...] You may configure one of your master-eligible nodes to be a [voting-only node](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-node.html#voting-only-node) so that it can never be elected as the master node.

---

<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: [September 8, 2022, 7:59am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/4 "2022-09-08T07:59:27Z")

</div>

> [@dawiro](#):
>
> I ask because we have clusters whose topologies vary. For example, if we add make one of the tiers voting-only it could be that this tier isn't equal to the number of deployed masters, which is what we would prefer. The current structure of our deployment makes it impractical to assign "N" nodes to be voting only.

If you want to support different topologies, might it be worth creating a base cluster of 3 dedicated master nodes, out of which one can be voting-only if you only have 2 zones, to which you then add other non-master eligible nodes as appropriate (you do need at least one data node)?

---

<div class="post-metadata">

### Author: ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)
#### Post date: [September 8, 2022, 8:18am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/5 "2022-09-08T08:18:11Z")

</div>

Is there a limit that we can reach? How about clusters with XYZ nodes? Should we still use only three master-eligible nodes?

---

<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: [September 8, 2022, 8:26am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/6 "2022-09-08T08:26:03Z")

</div>

> [@cheshirecat](#):
>
> Is there a limit that we can reach? How about clusters with XYZ nodes? Should we still use only three master-eligible nodes?

Yes. Only one of the master-eligible nodes will at any point act as master. The others are there for resiliency. For larger clusters the size/resources of the dedicated master nodes may need to increase, but the number of master nodes does not scale based on cluster size.

---

<div class="post-metadata">

### Author: ![cheshirecat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheshirecat/32/109532_2.png) [@cheshirecat](https://discuss.elastic.co/u/cheshirecat)
#### Post date: [September 8, 2022, 8:39am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/7 "2022-09-08T08:39:12Z")

</div>

My question was not how man master nodes can be in a cluster at once but if there is a limit of

> [@Christian\_Dahlqvist](#):
>
> master-eligible

nodes.  
For a master-eligible node in `elasticsearch.yml` I have to set:

```auto
master.node: true

```

and is there a limit of nodes that can be configured like this?  
Example:  
Cluster made of 300 nodes. I want to use 50 as master-eligible. Will I be able to do this?

---

<div class="post-metadata">

### Author: ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)
#### Post date: [September 8, 2022, 8:40am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/8 "2022-09-08T08:40:43Z")

</div>

The problem we have is that we have processes which run occasionally in sit which simulate losing an az, so we lose a master (we have three). The asg then starts firing up a new instance but then the az is restored and so the asg kills one of the other masters to rebalance the azs. That then kills the cluster.

If we were to have 1 x voting only node then that would be insufficient in the case where we lose the az which contains that voting only node. So, I'm thinking we need at least three?

Also, how quickly does `cluster.auto_shrink_voting_configuration` take effect when masters are dropping out of the cluster vs new masters joining?

---

<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: [September 8, 2022, 8:50am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/9 "2022-09-08T08:50:32Z")

</div>

> [@dawiro](#):
>
> The problem we have is that we have processes which run occasionally in sit which simulate losing an az, so we lose a master (we have three). The asg then starts firing up a new instance but then the az is restored and so the asg kills one of the other masters to rebalance the azs. That then kills the cluster.

That sounds problematic. The master-eligible nodes should be static and brought back. You should not spin up and add a new master eligible node just to later romove one of them again. This may have worked in older versions, but from version 7 onwards there are more stringent checks in place to improve resiliency that may not be OK with in quick succesion adding and removing master eligible nodes.

I would recommend you change this process.

---

<div class="post-metadata">

### Author: ![dawiro](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@dawiro](https://discuss.elastic.co/u/dawiro)
#### Post date: [September 8, 2022, 10:47am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/10 "2022-09-08T10:47:44Z")

</div>

I see what you mean. I'll take this up internally. 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: [October 6, 2022, 10:48am UTC](https://discuss.elastic.co/t/about-voting-only-nodes/313948/11 "2022-10-06T10:48:22Z")

</div>

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