Shard Allocation Forced Awareness

Hi everyone, want to get a bit more understanding on Shard Allocation Forced Awareness.

If the nodes housing the primary shards in zone1 go down, will the replica shards in zone2 become primary and not create replicas until zone1 is available again then create the replica's?
If the shards in zone2 become primary, what happens when the nodes in zone1 become available again with the primary shards?

Thanks

The first thing to consider is what happens to the master node when one zone goes down. Assuming you haveconfigured your cluster correctly and your cluster is evenly distributed across just 2 zones it may not be possible for a strict majority of master-eligible nodes to elect a new master or keep the current one elected. If this is the case the cluster state will remain red until enough master nodes are available and no indexing will be allowed.

If you do have enough mater nodes available the replica shards will indeed be promoted to primary and indexing will be allowed. Once the rest of the cluster comes back those shards will be deemed stale and replaced and/or updated so they are in sync.

Thanks for the response Christian,

Should have been more clear in our setup, we have three master nodes allocated to three site. Three data nodes in 2 of the sites (6 total) and not sure what will happen when forced shard allocation is enabled in the situation where one of the sites the 3 data nodes resides in becomes unavailable, master nodes will still hold a majority as two will remain up. Just want to be clear on this, in this situation the replica shards in the available data center will be promoted to primary and indexing will be allowed, when the failing location with the original primary shards becomes available again elastic will handle it?

That sounds like a correct setup, so should be handled automatically as you explained.

I use shard allocation awareness. One thing I have seen is that If you have configured one replica per shard (by default) and have two "awareness zones" the cluster will stay YELLOW as long as one AZ is unavailable because there is no place to start the replica. The cluster should be fine to index new data and serve data still...

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