2015-06-30 07:53:04 -04:00
|
|
|
[[allocation-total-shards]]
|
2018-12-11 10:44:57 -05:00
|
|
|
=== Total shards per node
|
2015-06-30 07:53:04 -04:00
|
|
|
|
|
|
|
The cluster-level shard allocator tries to spread the shards of a single index
|
|
|
|
across as many nodes as possible. However, depending on how many shards and
|
|
|
|
indices you have, and how big they are, it may not always be possible to spread
|
|
|
|
shards evenly.
|
|
|
|
|
|
|
|
The following _dynamic_ setting allows you to specify a hard limit on the total
|
|
|
|
number of shards from a single index allowed per node:
|
|
|
|
|
|
|
|
`index.routing.allocation.total_shards_per_node`::
|
|
|
|
|
|
|
|
The maximum number of shards (replicas and primaries) that will be
|
|
|
|
allocated to a single node. Defaults to unbounded.
|
|
|
|
|
2015-11-02 17:35:39 -05:00
|
|
|
You can also limit the amount of shards a node can have regardless of the index:
|
|
|
|
|
|
|
|
`cluster.routing.allocation.total_shards_per_node`::
|
|
|
|
|
|
|
|
The maximum number of shards (replicas and primaries) that will be
|
|
|
|
allocated to a single node globally. Defaults to unbounded (-1).
|
|
|
|
|
2015-06-30 07:53:04 -04:00
|
|
|
[WARNING]
|
|
|
|
=======================================
|
2016-02-22 11:39:32 -05:00
|
|
|
These settings impose a hard limit which can result in some shards not being
|
2015-11-02 17:35:39 -05:00
|
|
|
allocated.
|
2015-06-30 07:53:04 -04:00
|
|
|
|
|
|
|
Use with caution.
|
|
|
|
=======================================
|