# Number of Master nodes across two data centers

**URL:** <https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753>\
**Category:** Elasticsearch\
**Created:** [September 9, 2019, 5:41pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753 "2019-09-09T17:41:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vertigo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vertigo/32/53875_2.png) [@Vertigo](https://discuss.elastic.co/u/Vertigo)\
**Post date:** [September 9, 2019, 5:41pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753/1 "2019-09-09T17:41:28Z")

</div>

We are working on redesigning our currently cluster. Our 40 ES data nodes are split between 2 data centers, 20 in each. Currently there are 3 master dedicated nodes, 2 in one DC, and 1 in the other. The goal with the two datacenters would be to have the primary shard in one DC and the replica in the other.

Theoretically, if 1 datacenter was to go offline, a new master election would fail because there wouldn't be enough nodes for a quorum. If we increased the number of masters this problem continues as 3,5,7 etc. all will have the same issue.

Is there a solution to this problem?

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:** [September 9, 2019, 5:44pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753/2 "2019-09-09T17:44:13Z")

</div>

You can not create a symmetrically highly available cluster across just 2 data centres. You therefore need a dedicated master node in a third data center to act as an arbiter. Voting only nodes have recently been introduced and could be used as arbiter but if you are on an earlier version a dedicated master node will be your best bet.

---

<div class="post-metadata">

**Author:** ![Vertigo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vertigo/32/53875_2.png) [@Vertigo](https://discuss.elastic.co/u/Vertigo)\
**Post date:** [September 9, 2019, 5:55pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753/3 "2019-09-09T17:55:14Z")

</div>

Ok, sounds like a master node in a third location is the best bet for use case.

Thanks for the input!

---

<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 7, 2019, 5:55pm UTC](https://discuss.elastic.co/t/number-of-master-nodes-across-two-data-centers/198753/4 "2019-10-07T17:55:15Z")

</div>

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