重启集群的时候 先设置为 none,禁止自动同步,集群挨个重启完以后再改为all,开启自动同步

  1. PUT /_cluster/settings
  2. {
  3. "persistent": {
  4. "cluster.routing.rebalance.enable": "none",
  5. "cluster.routing.allocation.enable": "none"
  6. }
  7. }
  8. PUT /_all/_settings
  9. {
  10. "settings": {
  11. "index.unassigned.node_left.delayed_timeout": "5m"
  12. }
  13. }
  1. PUT /_cluster/settings
  2. {
  3. "persistent": {
  4. "cluster.routing.rebalance.enable": "all",
  5. "cluster.routing.allocation.enable": "all"
  6. }
  7. }

加快恢复速度

变更:

  1. PUT /_cluster/settings
  2. {
  3. "transient": {
  4. "cluster.routing.allocation.node_concurrent_recoveries": "24",
  5. "indices.recovery.max_bytes_per_sec": "-1"
  6. }
  7. }

还原:

  1. PUT /_cluster/settings
  2. {
  3. "transient": {
  4. "cluster.routing.allocation.node_concurrent_recoveries": "2",
  5. "indices.recovery.max_bytes_per_sec": "50m"
  6. }
  7. }
  • cluster.routing.allocation.node_concurrent_recoveries
    设置在节点中最大允许同时进行分片分布的个数,默认为2
文档更新时间: 2019-07-09 11:03   作者:admin