# [질문 B] 죽은 IP 자동 회피 — outlier detection (passive health check). # 대상은 egress gateway가 외부로 나가는 구간의 cluster(host: httpbin.org). # DNS refresh는 liveness를 모르므로, 연속 실패한 endpoint를 일시적으로 풀에서 빼는(ejection) # outlier detection을 명시해야 죽은 IP를 빠르게 회피할 수 있다. apiVersion: networking.istio.io/v1beta1 kind: DestinationRule metadata: name: httpbin-ext-outlier namespace: mesh-test spec: host: httpbin.org trafficPolicy: connectionPool: tcp: connectTimeout: 2s # connect 실패를 빨리 판정(죽은 IP 감지 속도) outlierDetection: # --- L7(HTTP) 기준 실패 카운트 (TLS origination 등 L7 경로에서 유효) --- consecutive5xxErrors: 5 # 연속 5xx 5회 → eject consecutiveGatewayErrors: 5 # 502/503/504 연속 5회 # --- L4 기준 실패 카운트 (현 passthrough처럼 L4 경로에서 핵심) --- consecutiveLocalOriginFailures: 3 # connect timeout/RST 등 로컬원인 연속 3회 → eject splitExternalLocalOriginErrors: true # 외부(5xx) vs 로컬(connect) 실패를 분리 집계 # --- 공통 동작 파라미터 --- interval: 10s # 평가 주기 baseEjectionTime: 30s # 최초 ejection 유지(재발 시 배수로 증가) maxEjectionPercent: 50 # 최대 50%만 빼서 전체 차단 방지 minHealthPercent: 40 # 건강 endpoint가 40% 미만이면 outlier 비활성(panic 회피)