Cilium 1.18 Hubble로 east-west 트래픽 시각화 중. 가시성은 좋은데 Prometheus 메모리가 28GB로 폭증. metric series 분석하니 1.4M series.
# 주요 high-cardinality metric
hubble_flows_processed_total
{source_pod=..., dest_pod=..., destination_port=...}
# pod 수 = 800
# pod 페어 = 800 × 800 = 640K series
# × port 다양 = 1.4M
Hubble 가시성 유지하면서 Prometheus 부담 줄이는 패턴 있나요?
댓글 3
Hubble의 metric high-cardinality는 흔한 문제입니다. 3단계 접근.
1. metric scope 줄이기
Cilium configmap에서 metric label 명시 제거:
변경 후 — pod별 1.4M → namespace별 30K series. 95% 절감.
2. recording rules로 aggregation
Prometheus에서 자주 보는 view를 미리 aggregation. raw metric은 짧게 보관.
raw metric retention 7일 → aggregated 90일. 메모리 70% 절감.
3. Hubble Relay → ClickHouse
raw flow data는 Prometheus에 두지 말고 별도 ClickHouse로:
ClickHouse는 compression 90%+ 효율적. flow 1억 row이 1.4GB.
저희 운영 패턴
총 메모리 28GB → 4GB, 디스크 비용 -68%, 가시성 유지.
Mimir(Grafana)로 Prometheus 대체도 옵션입니다. Mimir는 long-term storage S3 직결 + horizontal scale. high-cardinality에 강합니다. 다만 운영 복잡도 추가.