| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 | [[allocation-total-shards]]=== Total shards per nodeThe cluster-level shard allocator tries to spread the shards of a single indexacross as many nodes as possible. However, depending on how many shards andindices you have, and how big they are, it may not always be possible to spreadshards evenly.The following _dynamic_ setting allows you to specify a hard limit on the totalnumber of shards from a single index allowed per node:[[total-shards-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.You can also limit the amount of shards a node can have regardless of the index:[[cluster-total-shards-per-node]]`cluster.routing.allocation.total_shards_per_node`::+--(<<dynamic-cluster-setting,Dynamic>>)Maximum number of primary and replica shards allocated to each node. Defaults to`-1` (unlimited).{es} checks this setting during shard allocation. For example, a cluster has a`cluster.routing.allocation.total_shards_per_node` setting of `100` and threenodes with the following shard allocations:- Node A: 100 shards- Node B: 98 shards- Node C: 1 shardIf node C fails, {es} reallocates its shard to node B. Reallocating the shard tonode A would exceed node A's shard limit.--[WARNING]=======================================These settings impose a hard limit which can result in some shards not beingallocated.Use with caution.=======================================
 |