分片管理

分片分配

cluster.routing.allocation.enable
控制分片分配,通常在集群升级重启前需手动设置关闭以免不必要的IO浪费。

  1. curl -X PUT "localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'
  2. {
  3. "persistent": {
  4. "cluster.routing.allocation.enable": "none/all/primaries/new_primaries"
  5. }
  6. }
  7. '

index.allocation.max_retries
用于控制分片分配最大重试次数
image.png
https://cloud.tencent.com/developer/article/1361266
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/cluster-reroute.html
https://www.elastic.co/guide/en/elasticsearch/reference/6.6/rolling-upgrades.html

分片恢复
https://cloud.tencent.com/developer/article/1370560

内存设置

indices.fielddata.cache.size
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-fielddata.html#modules-fielddata
indices.breaker.fielddata.limit
https://www.elastic.co/guide/en/elasticsearch/reference/current/circuit-breaker.html#fielddata-circuit-breaker