# How to decide on number of Master and data nodes between two data centers

**URL:** <https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097>\
**Category:** Elasticsearch\
**Created:** [January 21, 2022, 8:41pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097 "2022-01-21T20:41:52Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [January 21, 2022, 8:41pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/1 "2022-01-21T20:41:53Z")

</div>

Hi All,

We have a total of 8 servers (4 in each data center), running ELK 7.6.2 stack.

How can we decide on the number of Master (or Master-eligible) nodes and data nodes?

Please help

---

<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:** [January 21, 2022, 8:56pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/2 "2022-01-21T20:56:31Z")

</div>

In order to deploy a highly available cluster you need [three independent zones/data centres](https://www.elastic.co/guide/en/elasticsearch/reference/7.16/high-availability-cluster-design.html). What are your requirements and use case?

---

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [January 21, 2022, 10:01pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/3 "2022-01-21T22:01:01Z")

</div>

Thanks. As the servers are split in two different data centers we want resilience so that in case of failure of the entire production data center we should have our cluster functioning well in the disaster recovery environment.

Looks like the recommendation is to limit the number of master-eligible nodes in the cluster to three. How do we spread the three nodes across two data centers and what should be the expectation in case of loss of servers in one data center?

---

<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:** [January 21, 2022, 10:28pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/4 "2022-01-21T22:28:27Z")

</div>

You can not achieve high availability with only two data centres as one of them must contain a majority of the 3 master eligible nodes and therefore will result in a failed cluster if it goes down. You need at least a dedicated master node in a third data center to act as an arbiter. Have a look at the docs I linked to for further details.

---

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [February 3, 2022, 7:46pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/5 "2022-02-03T19:46:52Z")

</div>

Thanks.

Can we not have 2 masters in one data center and 1 on the other? In the event of one side going down we will have master (s) available. Our cluster contains servers spread in two data centers

---

<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:** [February 3, 2022, 8:13pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/6 "2022-02-03T20:13:18Z")

</div>

You always need a strict majority of master eligible nodes available for a fully operational cluster. If you lose the data centre with 2 master eligible nodes the cluster can no longer elect a master and is no longer available. If the data centre with only one master eligible node was lost you would however be fine. This is why three zones are required for high availability.

---

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [February 3, 2022, 10:34pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/7 "2022-02-03T22:34:34Z")

</div>

Thanks for the clarification.

> [@Christian\_Dahlqvist](#):
>
> You need at least a dedicated master node in a third data center to act as an arbiter.

So this arbiter can only be one Master eligible node in a third date center?

This is how the whole picture would be then:

Data Center 1 =\> 4 nodes (2 Master eligible + 2 data)

Data Center 2 =\> 4 nodes (1 Master eligible + 3 data)

Data Center 3 =\> 1 node (Master eligible) acting as arbiter

Please advise and correct the picture above as appropriate.

Also does the arbiter master node require any special configuration or is it just another master node? The link you posted doesn't tell much about the arbiter.

Thanks

---

<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:** [February 4, 2022, 6:07am UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/8 "2022-02-04T06:07:12Z")

</div>

Each of the two data centers would have 1 master eligible nodes plus dedicated data nodes. The node in the third zone is often made a dedicated master node, possibly voting only, as this allows it to be deployed with limited resource requirements.

---

<div class="post-metadata">

**Author:** ![zaeemmasood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zaeemmasood/32/102383_2.png) [@zaeemmasood](https://discuss.elastic.co/u/zaeemmasood)\
**Post date:** [February 4, 2022, 2:32pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/9 "2022-02-04T14:32:51Z")

</div>

Thanks @Christian_Dahlqvist

---

<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 4, 2022, 2:33pm UTC](https://discuss.elastic.co/t/how-to-decide-on-number-of-master-and-data-nodes-between-two-data-centers/295097/10 "2022-03-04T14:33:05Z")

</div>

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