Elasticsearch会自动的控制shard在各个节点的分配,同时也提供了配置方法,允许用户根据自己的特定需求对shard的分配策略进行一定的定制。其中,Index
shard allocation 介绍了如下几种在索引级别(index-level)的配置:
- shard allocation filtering (index-/cluster-level)
- total shard per node
- disk-based shard allocation
同时, 在cluster shards allocation 中介绍了集群级别(cluster-level)的基于shard
allocation awareness的分配配置。