When does ElasticSearch reallocate shards between nodes?


(ElasticSearch Users mailing list) #1

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.


(Jörg Prante) #2

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

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-update-settings.html#_balanced_shards

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.


(ElasticSearch Users mailing list) #3

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

http://www.elasticsearch.org/guide/en/elasticsearch/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 <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.


(Jörg Prante) #4

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.

http://www.elasticsearch.org/guide/en/elasticsearch/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 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

http://www.elasticsearch.org/guide/en/elasticsearch/
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.


(ElasticSearch Users mailing list) #5

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.

http://www.elasticsearch.org/guide/en/elasticsearch/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 <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

http://www.elasticsearch.org/guide/en/elasticsearch/
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.


(Jörg Prante) #6

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.

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/cluster-reroute.html

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.

http://www.elasticsearch.org/guide/en/elasticsearch/
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

http://www.elasticsearch.org/guide/en/elasticsearch/referenc
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.


(system) #7