Opscraft
Route 53 routing policies · Lesson 7 of 10 · 3 min read

Health checks in depth

Types

  1. 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).
  2. 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.
  3. 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, service ROUTE53_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".

Enlarge diagramGood /health for DNS failoverCommon mistakesChecks critical dependencies the region needsFast and cheap: no heavy queriesReturns 200 or 503 clearlyStatic page that is always 200Checks an optional third party, so it flapsBlocked by a security group: checkers cannotreach it
Figure 1. A health endpoint should prove the service can do real work, without failing because of things a restart would not fix.
Swipe sideways to see all of it, or tap to open it full screen.

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.