ElasticSearch cluster for DC failure tolerance

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?

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), as that will make sure the primary and replicas are not in the same DC. This saves disk space, of course.

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

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