AWS Route 53: Health Checks & DNS Failover
Introduction
Health Checks in Amazon Route 53 help monitor the health of public and private resources to ensure traffic is only routed to healthy endpoints. When combined with DNS failover, they enable automatic redirection of traffic away from unhealthy resources.
Why Use Health Checks?
- Ensure high availability by directing traffic only to healthy resources.
- Automatically failover if a resource becomes unavailable.
- Monitor public endpoints (e.g., load balancers, EC2 instances).
- Monitor private resources using CloudWatch Alarms.
Types of Health Checks in Route 53
Route 53 supports three types of health checks:
1️⃣ Endpoint Health Checks (Public Resources)
These health checks monitor a publicly accessible resource, such as:
- An Application Load Balancer (ALB)
- A web server
- Any other AWS public endpoint
🔹 How It Works:
- 15 AWS global health checkers send requests to the endpoint.
- If the response returns 200 OK (or a user-defined success code), the endpoint is healthy.
- You can configure:
- Health threshold: Number of successful checks needed to mark as healthy.
- Check interval: Either 30 seconds (standard) or 10 seconds (fast, higher cost).
- Protocols: Supports HTTP, HTTPS, TCP.
- Custom text validation: Can check for specific text in the first 5,120 bytes of the response.