Allocation
分布问题-集群级参数
1. 单机部署多实例,索引主备分布问题- cluster.routing.allocation.same_shard.host [静态配置]
检查同一物理机上的索引主备不能同时存在,防止该物理机节点挂掉,主备分片全部丢失不可用
Allows to perform a check to prevent allocation of multiple instances of the same shard on a single host, based on host name and host address. Defaults to false, meaning that no check is performed by default. This setting only applies if multiple nodes are started on the same machine.
cluster.routing.allocation.same_shard.host: true
2. 同一机架索引主备分布问题- cluster.routing.allocation.awareness.attributes [动态配置]
If Elasticsearch is aware of the physical configuration of your hardware, it can ensure that the primary shard a