5 nodes (n1-n2-n3-n4-n5)
1 index with 3 shards and 1 replica
2 datacenter (n1 in DC1, n2 in DC2, n3 in DC1, n4 in DC2, n5 in DC1)
shard0 is on n1 and n5 (so in DC1)
shard1 is on n2 and n4 (so in DC2)
shard2 is on n3 and n1
In this situation, if Datacenter1 will go down I will not be able to use that index.
is there a way to avoid this situation? obviously, Elasticsearch could not know the datacenter position of every node but could I assign them an attribute and then balance the shards?
I'm already using attributes to isolate data nodes for different services purpose so probably I have to use one or more additional attribute to limitate any data loss due to geographic separation.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.