A company uses Amazon Route 53 active-passive failover to route traffic to a primary web application in the us-east-1 Region. The primary DNS record is associated with a Route 53 health check that monitors a CloudWatch alarm. This alarm is configured to monitor a custom metric, ApplicationErrorCount, which is only published to CloudWatch when the application encounters internal server errors. During periods of no traffic, no metrics are published, causing the CloudWatch alarm to enter the INSUFFICIENT_DATA state. This transitions the Route 53 health check to unhealthy, triggering an undesired failover to the passive region. Which configuration change will prevent the undesired failovers while maintaining automated failover capability?
- AModify the primary Route 53 record's routing policy to weighted routing, assigning a weight of 100 to the primary record and a weight of 0 to the secondary record.
- Configure the Route 53 health check to treat the INSUFFICIENT_DATA state of the CloudWatch alarm as "Healthy".Answer
- CEnable detailed monitoring on the application's EC2 instances to ensure metrics are reported at 1-minute intervals, keeping the CloudWatch alarm in the OK state.
- DReconfigure the Application Load Balancer target group to use Multi-AZ deployment and automatically redirect traffic to a standby target group in another region without Route 53.
Answer
Configure the Route 53 health check to treat the INSUFFICIENT_DATA state of the CloudWatch alarm as "Healthy".
Configuring the Route 53 health check to treat the INSUFFICIENT_DATA state of the CloudWatch alarm as 'Healthy' solves the issue. When a Route 53 health check is configured to monitor a CloudWatch alarm, the administrator must specify how the health check behaves if the alarm has insufficient data. Since the custom metric ApplicationErrorCount is only published when errors occur, the alarm naturally enters the INSUFFICIENT_DATA state during healthy, low-traffic periods. Treating this state as 'Healthy' prevents false failovers.
Step-by-Step Solution
Key Concept
Route 53 DNS Failover using CloudWatch Alarm Health Checks
Estimated Time:1m 30s