Soru

Zorluk: Çok zorRoute 53 DNS Failover

A company hosts a high-traffic web application using an active-passive Amazon Route 53 DNS failover configuration. The primary record is a CNAME record pointing to an Application Load Balancer (ALB) in us-east-1 with a TTL of 900 seconds. The secondary record is an Alias record pointing to a static maintenance page hosted on an Amazon S3 bucket configured for website hosting in us-west-2. Currently, a custom Route 53 health check monitors a CloudWatch alarm based on the ALB's HTTPCode_Target_5XX_Count metric, configured with standard monitoring (5-minute period) and an evaluation period of 2 datapoints. During a database outage, the application returned 502 Bad Gateway errors. Users continued to receive errors for more than 15 minutes before being redirected to the maintenance page. Once the database recovered briefly and then failed again, Route 53 DNS resolution repeatedly flapped between the ALB and the S3 bucket. The SysOps administrator must reconfigure the setup to ensure that failover to the S3 bucket occurs within 2 minutes of an outage and that flapping is mitigated during brief periods of recovery. Which TWO actions should the SysOps administrator take to meet these requirements?

  1. Replace the primary CNAME record with a Route 53 Alias record pointing to the Application Load Balancer, and enable the Evaluate Target Health option.Cevap
  2. Configure the Application Load Balancer's target group health check with an interval of 10 seconds, an unhealthy threshold of 2, and a healthy threshold of 5.Cevap
  3. C
    Modify the CloudWatch alarm to use detailed monitoring at a 1-minute period, and set the Route 53 health check's failure threshold to 2 to trigger the failover quickly.
  4. D
    Keep the primary CNAME record, and create a Route 53 HTTP health check pointing directly to the Application Load Balancer DNS endpoint with a 10-second interval and a failure threshold of 2.
  5. E
    Configure a secondary CNAME record in Route 53 pointing to an Amazon RDS Read Replica in us-west-2, and enable automatic database promotion to handle the failover.

Cevap

Replace the primary CNAME record with a Route 53 Alias record pointing to the Application Load Balancer and enabling the Evaluate Target Health option, and configure the Application Load Balancer's target group health check with an interval of 10 seconds, an unhealthy threshold of 2, and a healthy threshold of 5.
Replacing the CNAME record with an Alias record pointing to the Application Load Balancer and enabling 'Evaluate Target Health' enables Route 53 to determine health based on the target group health checks, while automatically reducing the DNS TTL to 60 seconds to prevent client-side caching. Configuring the ALB's target group health check with a 10-second interval, an unhealthy threshold of 2, and a healthy threshold of 5 ensures that unhealthy targets are detected in 20 seconds, and requires 50 seconds of stable recovery before failing back, preventing flapping.

Adım Adım Çözüm

1
Analyze the DNS caching issue
The primary record is a CNAME with a TTL of 900 seconds (15 minutes). During a failover event, clients and resolvers will cache this record, delaying failover regardless of health check speed.
To ensure failover occurs within 2 minutes, we must reduce the TTL. Replacing the CNAME with an Alias record pointing to the ALB automatically sets the TTL to 60 seconds.
2
Evaluate the health check mechanism
The current setup uses a CloudWatch alarm based on standard monitoring (5-minute period) and 2 evaluation periods, which takes 10 minutes to alarm.
By enabling 'Evaluate Target Health' on the Route 53 Alias record, Route 53 directly queries the health of the ALB target groups, avoiding CloudWatch alarm latency.
3
Configure target group health check parameters for speed and stability
Setting the interval to 10 seconds and unhealthy threshold to 2 marks targets unhealthy in 20 seconds. Setting the healthy threshold to 5 prevents flapping by requiring 50 seconds of consecutive successful checks before marking the target healthy.
This meets both the 2-minute failover requirement and the mitigation of flapping during transient database recovery.

Anahtar Kavram

Amazon Route 53 DNS failover requires a low TTL (achieved via Alias records) and rapid, stable health check evaluation (achieved via target group health check optimization and Evaluate Target Health).
Bu soruyu puanla