We have a requirement where we want to create a node and ask it to join the
cluster. But we don't want this node to have primary shard.
it is like a Disaster scenario where I have a node running on disaster
server but that node will never have primary shards of my index. It can
only have replica of my index.
So we looking for a way to configure node or index to control where to
place primary and replica shards?
All shards are created equally. Elasticsearch promotes replica
automatically to primaries if necessary. So there is no reason for any
headache around primary/replica locations, ES manages node disaster
automatically.
We have a requirement where we want to create a node and ask it to join
the cluster. But we don't want this node to have primary shard.
it is like a Disaster scenario where I have a node running on disaster
server but that node will never have primary shards of my index. It can
only have replica of my index.
So we looking for a way to configure node or index to control where to
place primary and replica shards?
I agree Elasticsearch is good in managing primary/replica shards allocation.
But we have to need where we want some nodes to never have primary shards
so I was curious to know is there any node or index level setting which we
can use for this?
Thanks
On Monday, March 2, 2015 at 1:06:03 PM UTC-8, Jörg Prante wrote:
All shards are created equally. Elasticsearch promotes replica
automatically to primaries if necessary. So there is no reason for any
headache around primary/replica locations, ES manages node disaster
automatically.
Jörg
On Mon, Mar 2, 2015 at 8:46 PM, Davinder Deol <davind...@gmail.com
<javascript:>> wrote:
We have a requirement where we want to create a node and ask it to join
the cluster. But we don't want this node to have primary shard.
it is like a Disaster scenario where I have a node running on disaster
server but that node will never have primary shards of my index. It can
only have replica of my index.
So we looking for a way to configure node or index to control where to
place primary and replica shards?
Strange requirement, but you can tag nodes with a shard allocation filter
and then you can create an index with replica level 0 that will be created
only on the tagged nodes. After that you can remove the allocation filter
and increase replica level. Do not forget to check if index recovery and
restarting ES will work as expected.
I agree Elasticsearch is good in managing primary/replica shards
allocation.
But we have to need where we want some nodes to never have primary shards
so I was curious to know is there any node or index level setting which we
can use for this?
Thanks
On Monday, March 2, 2015 at 1:06:03 PM UTC-8, Jörg Prante wrote:
All shards are created equally. Elasticsearch promotes replica
automatically to primaries if necessary. So there is no reason for any
headache around primary/replica locations, ES manages node disaster
automatically.
We have a requirement where we want to create a node and ask it to join
the cluster. But we don't want this node to have primary shard.
it is like a Disaster scenario where I have a node running on disaster
server but that node will never have primary shards of my index. It can
only have replica of my index.
So we looking for a way to configure node or index to control where to
place primary and replica shards?
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.