Cloud / DevOpsObservability & ReliabilityDiagramBeginner
Health Check
KO: 헬스 체크·EN: Health Check·JA: ヘルスチェック
Periodic diagnostic probes (Startup, Liveness, Readiness) used by load balancers and orchestrators to verify instance health, route traffic safely, and auto-restart wedged processes
Table of Contents
Structure Diagram
Kubernetes Probe Lifecycle (Startup → Liveness → Readiness)
2/4Readiness— Gate live traffic routing
Gate live traffic routingQuick Answer
What is Health Check?
Periodic diagnostic probes (Startup, Liveness, Readiness) used by load balancers and orchestrators to verify instance health, route traffic safely, and auto-restart wedged processes. It is a core concept in Observability & Reliability within Cloud / DevOps.
Core Principles
Health Checks are periodic HTTP (/healthz), TCP, or gRPC probes sent by load balancers and orchestrators to verify that backend instances are truly healthy and ready to serve traffic.
Modern cloud platforms separate probes into three distinct roles:
- Startup Probe: Protects slow-starting applications from premature kills during initialization.
- Readiness Probe: Determines whether an instance can accept live traffic; failure removes it from the load balancer without restarting it.
- Liveness Probe: Detects deadlocked or wedged processes; failure triggers an automatic container restart.
Practical Takeaways
- Never check external databases inside a Liveness probe: If a shared database blips for 5 seconds and causes every pod's Liveness probe to fail, Kubernetes will restart your entire fleet simultaneously, creating a thundering herd that prolongs the outage. Keep Liveness strictly local to the process.
- Separate
/liveand/readyendpoints: Use/health/livefor minimal process responsiveness and/health/readyto gate traffic during cache warm-up or graceful shutdown. - Tune thresholds against transient pauses: Configure sensible
timeoutSecondsandfailureThreshold(e.g., 3 consecutive failures) so brief GC pauses do not trigger false restarts.
Notable Examples
- Kubernetes Probes: Combines Startup, Readiness, and Liveness probes for safe rolling updates and self-healing.
- AWS ALB Target Group Health Checks: Automatically drains unhealthy targets and restores them once consecutive checks pass.
- gRPC Health Checking Protocol: Native standard (
grpc.health.v1.Health) supported directly by Kubernetes and Envoy.