运行了两年的ES集群,今天索引节点突然不均衡,新建索引分片都集中到一个节点上了,如下图:
同时还有部分节点分片在恢复,如上图,有432个待恢复分片,而且只有两个分片在同时恢复,网络吞吐也很小,这要等到猴年马月:
首先调整索引分布,在集群元数据比较大情况下,修改settings可能会超过30s,需要在后面指定master_timeout:
"index.routing.allocation.include._ip":"node1ip,node2ip,node3ip,node4ip,node5ip"
}'
然后再修改索引恢复参数:
curl -XPUT 'http://localhost:9200/_cluster/settings?flat_settings=true&timeout=60000s&master_timeout=60000s' -d '
{
"transient" : {
"indices.recovery.max_bytes_per_sec" : "900mb",
"cluster.routing.allocation.node_concurrent_recoveries": "10",
"cluster.routing.allocation.cluster_concurrent_rebalan