Health checks in depth
Types
- Endpoint health checks — Route 53 health checkers in multiple AWS regions probe an IP or domain over HTTP, HTTPS or TCP. Optional string matching (the response body must contain a string within the first 5,120 bytes).
- Calculated health checks — combine child checks with logic: healthy if at least N of M children are healthy. Useful to declare a region unhealthy only when several components fail.
- CloudWatch alarm health checks — healthy/unhealthy follows a CloudWatch alarm's state. This is how you health-check private resources (Route 53 checkers run on the internet and can't reach private IPs) or base health on business metrics (error rate, queue depth).
Settings
| Setting | Values | Notes |
|---|---|---|
| Request interval | 30 s (standard) or 10 s (fast, extra cost) | Per checker; many checkers worldwide, so endpoints get frequent requests |
| Failure threshold | 1–10 consecutive failures | Balance detection speed vs flapping |
| Health checker regions | Default set or a chosen subset (min 3) | |
| Healthy if | More than 18% of checkers report healthy | Avoids false failovers from one checker region's network issue |
| Latency graphs, inversion, SNI | Optional |
- HTTP/HTTPS checks: the TCP connection must open within 4 seconds and the endpoint must return 2xx or 3xx within 2 seconds after connecting. TCP checks: the connection must open within 10 seconds.
- Allow the Route 53 health checker IP ranges (published in AWS
ip-ranges.json, serviceROUTE53_HEALTHCHECKS) in security groups/firewalls. - CloudWatch metrics (
HealthCheckStatus) and alarms → SNS notifications when endpoints go unhealthy.
Design a meaningful health endpoint
A health check that only tests "is the web server up" fails over too late (the app can be broken behind a healthy Nginx) or too early (a dependency blip takes down a whole region). A good regional health endpoint checks the app and its critical in-region dependencies, is cheap and fast, and isn't cached. Calculated checks and CloudWatch alarm checks let you express "the region is really broken".
Flapping
Health checks bouncing between healthy and unhealthy cause traffic to oscillate between regions — worse than either state. Fixes: higher failure thresholds, a stable health endpoint, calculated checks, hysteresis in alarms, and investigating the root cause of intermittent failures.
Cost
Billed per health check per month — more for HTTPS, string matching, fast interval, latency measurement, and non-AWS endpoints. Alias records with evaluate-target-health cost nothing extra.