ES什么时候会平衡分片

 "cluster.routing.allocation.balance.shard":"0.45f",//定义分配在该节点的分片数的因子 阈值=因子*(当前节点的分片数-集群的总分片数/节点数,即每个节点的平均分片数)

 "cluster.routing.allocation.balance.index":"0.55f",//定义分配在该节点某个索引的分片数的因子,阈值=因子*(保存当前节点的某个索引的分片数-索引的总分片数/节点数,即每个节点某个索引的平均分片数)

"cluster.routing.allocation.balance.threshold":"1.0f",//超出这个阈值就会重新分配分片

"cluster.routing.allocation.total_shards_per_node":-1,//单个节点的最大分片数
//Disk-based Shard Allocation "cluster.routing.allocation.disk.threshold_enabled":true,//是否开启基于硬盘的分发策略 "cluster.routing.allocation.disk.watermark.low":"85%",//不会分配分片到硬盘使用率高于这个值的节点 "cluster.routing.allocation.disk.watermark.high":"90%",//如果硬盘使用率高于这个值,则会重新分片该节点的分片到别的节点 "cluster.info.update.interval":"30s",//当前硬盘使用率的查询频率 "cluster.routing.allocation.disk.include_relocations":true,//计算硬盘使用率时,是否加上正在重新分配给其他节点的分片的大小


摘自:https://github.com/13428282016/elasticsearch-CN/wiki/%E4%BB%80%E4%B9%88%E6%97%B6%E5%80%99%E4%BC%9A%E5%B9%B3%E8%A1%A1%E5%88%86%E7%89%87
原文地址:https://www.cnblogs.com/bonelee/p/7443727.html