[Elasticsearch] 노드 교체

HI·2022년 6월 22일
0

노드 교체

교체작업전 사용중인 모든 인덱스는 replica를 가지고 있어야한다.

1. shard routing none

#샤드 움직이지 않게
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": "none"
  }
}

2. 추가할 노드 start

./start.sh

3. 제거할 노드 stop

./stop.sh

4. 추가한 노드 클러스터에 들어왔는지 확인

GET _cat/nodes?s=name

5. shard routing null

#샤드 움직일 수 있게
PUT _cluster/settings
{
  "persistent": {
    "cluster.routing.allocation.enable": null
  }
}

6. shard가 initializing 되는지 모니터링

7. shard initializing 수 조절, 속도 조절

PUT /_cluster/settings
{
  "transient": {
    "indices.recovery.max_bytes_per_sec": "60mb", //default:40mb
    "cluster.routing.allocation.node_concurrent_recoveries" : 2 , // default:2
    "cluster.routing.allocation.node_concurrent_incoming_recoveries" : 2 //default:2
  }
}
profile
hi

0개의 댓글