原英文版地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/allocation-total-shards.html, 原文档版权归 www.elastic.co 所有
本地英文版地址: ../en/allocation-total-shards.html
本地英文版地址: ../en/allocation-total-shards.html
重要: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 当前版本文档。
Total shards per nodeedit
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.
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).
These settings impose a hard limit which can result in some shards not being allocated.
Use with caution.