# ElasticSearch cluster for DC failure tolerance

**URL:** <https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840>\
**Category:** Elasticsearch\
**Created:** [October 13, 2020, 4:50am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840 "2020-10-13T04:50:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vodka\_pivo](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vodka\_pivo](https://discuss.elastic.co/u/vodka_pivo)\
**Post date:** [October 13, 2020, 4:50am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840/1 "2020-10-13T04:50:20Z")

</div>

I have a 5 node ElasticSearch cluster which locates in 3 DataCenters

DC1:

```
ES01 (master-eligible, data)
ES02 (data)

```

DC2:

```
ES03 (master-eligible, data)
ES04 (data)

```

DC3:

```
ES05 (Master only node)

```

so i need to continue Read/Write operations in case of any DC Failure for example if DC2 is down, cluster now consists of 3 nodes (ES-01, ES-02 and ES-05) and it works so how many shards/ or other settings, like consistency for Reading/Writing should i have to be a DC fault tolerant? i think the (1 primary shards and 3 replica shards is good for that case) any suggestions? or its better to use 2 primary and 2 replica shards in that case?

---

<div class="post-metadata">

**Author:** ![Steve\_Mushero](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steve_mushero/32/22441_2.png) [@Steve\_Mushero](https://discuss.elastic.co/u/Steve_Mushero)\
**Post date:** [October 13, 2020, 8:14am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840/2 "2020-10-13T08:14:57Z")

</div>

The number of primaries don't matter for this as they are not guaranteed to be on separate nodes - the index (primary) shard count is for scaling data size or query performance, not any failure, etc.

The number of replicas is important, i.e. you'd use 3 if you want data on all four data nodes.

So I'd think you'd start with 1 primary and 3 replicas for simplicity, though you can also use 1 primary and and 1 replica if you use location awareness ([see docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/modules-cluster.html#shard-allocation-awareness)), as that will make sure the primary and replicas are not in the same DC. This saves disk space, of course.

---

<div class="post-metadata">

**Author:** ![vodka\_pivo](https://avatars.discourse-cdn.com/v4/letter/v/73ab20/32.png) [@vodka\_pivo](https://discuss.elastic.co/u/vodka_pivo)\
**Post date:** [October 15, 2020, 8:48am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840/3 "2020-10-15T08:48:56Z")

</div>

@Steve_Mushero thanks! but i found bug [https://github.com/elastic/elasticsearch/issues/63717](https://github.com/elastic/elasticsearch/issues/63717)

---

<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:** [November 12, 2020, 8:48am UTC](https://discuss.elastic.co/t/elasticsearch-cluster-for-dc-failure-tolerance/251840/4 "2020-11-12T08:48:56Z")

</div>

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