How to prevent both primary and replica shards to be in the same rack/hypervisor?

Hello,

I was wondering if given a case where i set
Primary Shard : 1
Replica Shard : 1

with this setup

image

What if my primary shad is in node 4 while my replica shad is in node 5 and when rack 1 goes down, I would result in data loss.

How can I ensure that the primary shard and replica shard would not be in the same rack?

Check out https://www.elastic.co/guide/en/elasticsearch/reference/7.1/allocation-awareness.html

Thanks!

1 Like

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