When does ElasticSearch reallocate shards between nodes?

Hi,

What can be the possible causes when ElasticSearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data or
something? What is the policy for this?

Thanks,
Sandeep

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There is a formula ES uses by default to find if nodes get unbalanced
regarding the shards. See

Jörg

On Thu, Aug 21, 2014 at 8:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasticsearch@googlegroups.com wrote:

Hi,

What can be the possible causes when Elasticsearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data or
something? What is the policy for this?

Thanks,
Sandeep

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoFrPFkgN8QkTDx6B%2Bq-3joicvMGB%2Bxj9vAtF4zeDoHPfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi Jorg,

Thanks. Is there a size based allocation. What seems to be is that we have
allocation based on number of primaries, per index, per node, etc. Is there
a size factor that comes into play like, say if the routing is not even
function, and shards on one node are more heavily loaded than another?

Thanks,
Sandeep

On Thursday, 21 August 2014 12:44:56 UTC+5:30, Jörg Prante wrote:

There is a formula ES uses by default to find if nodes get unbalanced
regarding the shards. See

Elasticsearch Platform — Find real-time answers at scale | Elastic

Jörg

On Thu, Aug 21, 2014 at 8:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch <elasti...@googlegroups.com <javascript:>> wrote:

Hi,

What can be the possible causes when Elasticsearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data or
something? What is the policy for this?

Thanks,
Sandeep

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There is disk-based allocation. It does not take shard volume into account.
It is not always a good idea to use total shard volume per node as a
measurement across indices, consider heavy bulk indexing with steep volume
changes, but the remaining disk space.

If you mean search load by "heavily loaded", I suggest to just add replica,
maybe auto expand replica, so each node holds every shard as a copy, for
best load balancing.

Jörg

On Thu, Aug 21, 2014 at 9:57 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasticsearch@googlegroups.com wrote:

Hi Jorg,

Thanks. Is there a size based allocation. What seems to be is that we have
allocation based on number of primaries, per index, per node, etc. Is there
a size factor that comes into play like, say if the routing is not even
function, and shards on one node are more heavily loaded than another?

Thanks,
Sandeep

On Thursday, 21 August 2014 12:44:56 UTC+5:30, Jörg Prante wrote:

There is a formula ES uses by default to find if nodes get unbalanced
regarding the shards. See

Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/current/cluster-update-settings.html#_balanced_shards

Jörg

On Thu, Aug 21, 2014 at 8:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasti...@googlegroups.com wrote:

Hi,

What can be the possible causes when Elasticsearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data or
something? What is the policy for this?

Thanks,
Sandeep

--
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 elasticsearc...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoG9kRDhd22oJ20Q8MSzDancbn67aNn89uADWovX3A11iw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I see what you mean.

Is it possible that once the shards have been allocated by this formula or
the policies, they will ever change again.

I mean, if we have 3 indices on a two node cluster with 10 shards each. Now
I add another index with 10 shards, will the EXISTING indices' shards be
reallocated? Or is reallocation only for new shards?

On Thursday, 21 August 2014 13:49:54 UTC+5:30, Jörg Prante wrote:

There is disk-based allocation. It does not take shard volume into
account. It is not always a good idea to use total shard volume per node as
a measurement across indices, consider heavy bulk indexing with steep
volume changes, but the remaining disk space.

Elasticsearch Platform — Find real-time answers at scale | Elastic

If you mean search load by "heavily loaded", I suggest to just add
replica, maybe auto expand replica, so each node holds every shard as a
copy, for best load balancing.

Jörg

On Thu, Aug 21, 2014 at 9:57 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch <elasti...@googlegroups.com <javascript:>> wrote:

Hi Jorg,

Thanks. Is there a size based allocation. What seems to be is that we
have allocation based on number of primaries, per index, per node, etc. Is
there a size factor that comes into play like, say if the routing is not
even function, and shards on one node are more heavily loaded than another?

Thanks,
Sandeep

On Thursday, 21 August 2014 12:44:56 UTC+5:30, Jörg Prante wrote:

There is a formula ES uses by default to find if nodes get unbalanced
regarding the shards. See

Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/current/cluster-update-settings.html#_balanced_shards

Jörg

On Thu, Aug 21, 2014 at 8:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasti...@googlegroups.com wrote:

Hi,

What can be the possible causes when Elasticsearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data or
something? What is the policy for this?

Thanks,
Sandeep

--
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 elasticsearc...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/f0f8129c-d61a-4a54-bf98-ce386846b194%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

By default, also existing shards will be reallocated.

You can also move shards around as you like but I do not recommend it if
you do it just for fun. ES default setting for shard allocation is very
good.

Jörg

On Thu, Aug 21, 2014 at 10:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasticsearch@googlegroups.com wrote:

I see what you mean.

Is it possible that once the shards have been allocated by this formula or
the policies, they will ever change again.

I mean, if we have 3 indices on a two node cluster with 10 shards each.
Now I add another index with 10 shards, will the EXISTING indices' shards
be reallocated? Or is reallocation only for new shards?

On Thursday, 21 August 2014 13:49:54 UTC+5:30, Jörg Prante wrote:

There is disk-based allocation. It does not take shard volume into
account. It is not always a good idea to use total shard volume per node as
a measurement across indices, consider heavy bulk indexing with steep
volume changes, but the remaining disk space.

Elasticsearch Platform — Find real-time answers at scale | Elastic
reference/current/index-modules-allocation.html#disk

If you mean search load by "heavily loaded", I suggest to just add
replica, maybe auto expand replica, so each node holds every shard as a
copy, for best load balancing.

Jörg

On Thu, Aug 21, 2014 at 9:57 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasti...@googlegroups.com wrote:

Hi Jorg,

Thanks. Is there a size based allocation. What seems to be is that we
have allocation based on number of primaries, per index, per node, etc. Is
there a size factor that comes into play like, say if the routing is not
even function, and shards on one node are more heavily loaded than another?

Thanks,
Sandeep

On Thursday, 21 August 2014 12:44:56 UTC+5:30, Jörg Prante wrote:

There is a formula ES uses by default to find if nodes get unbalanced
regarding the shards. See

Elasticsearch Platform — Find real-time answers at scale | Elastic
e/current/cluster-update-settings.html#_balanced_shards

Jörg

On Thu, Aug 21, 2014 at 8:26 AM, 'Sandeep Ramesh Khanzode' via
elasticsearch elasti...@googlegroups.com wrote:

Hi,

What can be the possible causes when Elasticsearch will automatically
reallocate a shard from node in the cluster to another node?

One can be obviously when you add a new node.

What are the automatic triggers, like continuously indexing new data
or something? What is the policy for this?

Thanks,
Sandeep

--
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 elasticsearc...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40goo
glegroups.com
https://groups.google.com/d/msgid/elasticsearch/e4569cb1-f33a-41ab-9598-ec5e0c7ef7b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%
40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6362f730-1ecd-4ffc-b1ef-fe4f343781c4%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/f0f8129c-d61a-4a54-bf98-ce386846b194%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/f0f8129c-d61a-4a54-bf98-ce386846b194%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGHQ_WSOpX7za65NnGPzHTeMxEhv0d03N0ZVswx4zZWRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.