joonsei
Hello, world!
joonsei
전체 방문자
오늘
어제
  • 분류 전체보기 (32)
    • nodejs (7)
    • javascript (3)
    • Elasticsearch (11)
    • Electron (1)
    • oracle (1)
    • etc (7)
    • MongoDB (1)

인기 글

최근 댓글

최근 글

joonsei
Elasticsearch

Elasticsearch Cluster 재기동, Rolling restart

2019. 12. 4. 11:41

2EA 이상 Cluster로 구성된 Elasticsearch 서버를 재기동 해야할 때,
하나의 Elasticsearch를 서비스 종료 시, 데이터 Node들이 relocate 되서, 많은 리소스가 소모 된다.

빠르게 재기동 하기 위해서는 이 relocate 옵션을 끄고 진행한다.

  • shard allocation 옵션을 disable
$ curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
    "transient" : {
        "cluster.routing.allocation.enable" : "none"
    }
}
'
  • 노드 shutdown
 $ curl -XPOST 'localhost:9200/_cluster/nodes/_local/_shutdown'
  • 노드 start
$ /etc/init.d/elasticsearch
  • shard allocation 옵션을 다시 enable
$ curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
    "transient" : {
        "cluster.routing.allocation.enable" : "all"
    }
}
' 
저작자표시
    'Elasticsearch' 카테고리의 다른 글
    • 조건에 따른 특정 Document 데이터 삭제
    • [Elasticsearch] monitoring execution failed 오류
    • Kibana Mapping Conflict 해결 방법
    • kibana unassigned 처리
    joonsei
    joonsei
    IT 개발자의 소소한 기술 이야기.

    티스토리툴바