DBAtlas · 데이터베이스 운영 아틀라스

red/yellow 클러스터 분류 흐름 (어떤 인덱스, 어떤 샤드, 왜)

Elasticsearch클러스터/노드

명령어

GET _cluster/health?filter_path=status,unassigned_shards,initializing_shards,delayed_unassigned_shards,number_of_pending_tasks
GET _health_report?verbose=false
GET _cat/indices?v&health=red&h=health,index,pri,rep,docs.count,store.size
GET _cat/indices?v&health=yellow&h=health,index,pri,rep
GET _cat/shards?v&h=index,shard,prirep,state,unassigned.reason,unassigned.for,node&s=state
# Without a body, the call explains the first unassigned shard:
GET _cluster/allocation/explain

하는 일

클러스터 상태에서 문제 인덱스로, 다시 unassigned shard와 할당되지 않는 이유(unassigned.reason, allocation explain)로 내려가는 순서화된 분류 흐름을 제공한다. _health_report는 어떤 지표(디스크, 샤드 가용성, master)가 비정상인지 요약한다.

사용 시점

클러스터가 red 또는 yellow로 바뀔 때 첫 대응으로.

주의

Red: 최소 하나의 primary 샤드가 unassigned이다. 해당 인덱스로의 쓰기와 그 샤드에 닿는 검색이 실패한다. Yellow: 모든 primary는 있지만 replica가 누락되었다. 데이터는 접근 가능하지만 이중화가 없다. 단일 노드 클러스터에서는 replicas > 0인 인덱스가 영구히 yellow로 남는다(same_shard 결정). 최근에 노드가 떠났다면 delayed_unassigned_shards는 index.unassigned.node_left.delayed_timeout(기본 1m)이 만료될 때까지 의도적으로 보류된다.

DBAtlas에서 열기 →

관련 항목