Hello All,
I am trying to run an ES cluster across two data centers. Lets say DC1 and
DC2.
I have 6 nodes in total (N0 … N5) where (N0 … N2) belongs to DC1 and (N3…
N5) belong to DC2.
I plan to have 12 shards / index and 1 replica / shard.
My primary objective is to have the primary shard in one DC and their
replicas in the other DC (Master-Slave setup). In this way, I can achieve
some kind of Disaster Recovery if one DC goes down. Lets say DC1 goes down
and then DC2 has all the nodes and is fully functional.
My goals are the following,
- Control the allocation of indexes to one DC.
- Control the allocation of replicas to the other DC.
Goal 1 can be achieved using the shard allocation filtering as mentioned
here, http://www.elasticsearch.org/guide/reference/index-modules/allocation/ by
tagging the nodes to require DC1.
"index.routing.allocation.require.tag" : "DC1"
This way I can assure all the primary shards are in DC1.
However, I haven't been able to find any documentation on how I can control
the allocation of the replicas to the other DC (DC2 in this case.).
Do replicas too follow the shard allocation configuration? In this case,
will all the replicas belong to DC1 too? I did come across few posts
touching this issue, but solution seem unclear. With the new and better
versions of elastic search, I am wondering if this issue is now addressed.
Any input is appreciated.
Thank you,
Kunal
P.S. : I new to Elasticsearch and this is my first post in this community,
so please excuse me for any obvious mistakes and feel free to cite them.
Also, I wanted to thank the community for the great questions and solutions
already posted.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.