Soru

Zorluk: Çok zorRoute 53 Routing Policies and DNS Failover Strategies

An enterprise is deploying an active-passive disaster recovery (DR) architecture for a stateful web application. The primary environment is in us-west-2 with an Application Load Balancer (ALB) and an Amazon Aurora PostgreSQL database. The secondary environment in us-east-1 is a warm standby with a scaled-down Amazon EC2 fleet behind another ALB, and an Aurora read replica. The DR plan requires Route 53 to automatically shift DNS traffic to us-east-1 only if the primary ALB has no healthy EC2 targets, or if the primary application cannot connect to its database (determined by the absence of the string 'DB_OK' on the '/healthz' status page). The database promotion to primary will be handled by a separate automated script. Which Route 53 DNS failover configuration meets these requirements with the shortest recovery time?

  1. A
    Configure a primary Failover CNAME record pointing to the us-west-2 ALB DNS name, associate it with a Route 53 HTTP health check that queries the /healthz endpoint for the DB_OK string, and enable Evaluate Target Health. Configure a secondary Failover CNAME record pointing to the us-east-1 ALB.
  2. B
    Configure Latency Alias records for both regions pointing to their respective ALBs, set Evaluate Target Health to Yes, and associate each record with a Route 53 HTTP health check that queries the respective /healthz endpoint for the DB_OK string.
  3. Configure a Route 53 HTTP health check that queries the us-west-2 ALB DNS name at /healthz and checks for the string DB_OK. Create a primary Failover Alias record pointing to the us-west-2 ALB, set Evaluate Target Health to Yes, and associate it with the Route 53 health check. Create a secondary Failover Alias record pointing to the us-east-1 ALB with Evaluate Target Health set to Yes.Cevap
  4. D
    Configure a primary Failover Alias record pointing to the us-west-2 ALB with Evaluate Target Health set to No. Associate it with a Route 53 health check that monitors database replication lag, and configure Route 53 to automatically promote the us-east-1 Aurora read replica to primary when failover occurs.

Cevap

Configure a Route 53 HTTP health check that queries the us-west-2 ALB DNS name at /healthz and checks for the string DB_OK. Create a primary Failover Alias record pointing to the us-west-2 ALB, set Evaluate Target Health to Yes, and associate it with the Route 53 health check. Create a secondary Failover Alias record pointing to the us-east-1 ALB with Evaluate Target Health set to Yes.
The correct configuration uses Route 53 Failover Alias records combined with both Route 53 health checks and the Evaluate Target Health feature. Evaluate Target Health allows Route 53 to monitor the backend EC2 targets of the Application Load Balancer (ALB). Associating the Route 53 health check that performs response body string matching for 'DB_OK' ensures that deep application failures (such as database connectivity issues) are also detected. If either the ALB targets fail or the health check fails to find the string, Route 53 automatically fails over to the standby region.

Adım Adım Çözüm

1
Configure the application-level health check
A Route 53 HTTP health check is created to target the primary ALB DNS endpoint at /healthz, configured to fail if the response body does not contain the string DB_OK.
The Application Load Balancer cannot inspect the response body for specific strings on its own; hence, a Route 53 external health check is required to verify deep database connectivity.
2
Configure the Route 53 primary Failover Alias record
A primary Failover Alias record is created pointing to the us-west-2 ALB, with Evaluate Target Health set to Yes and associated with the health check created in Step 1.
Enabling Evaluate Target Health ensures Route 53 monitors target group health (infrastructure level), while associating the Route 53 health check ensures application-level status is evaluated. If either fails, the record is marked unhealthy.
3
Configure the Route 53 secondary Failover Alias record
A secondary Failover Alias record is created pointing to the us-east-1 ALB, with Evaluate Target Health set to Yes.
This guarantees that if the primary region is unhealthy, Route 53 redirects DNS queries to the standby region's ALB, while keeping the standby inactive during normal operations.

Anahtar Kavram

Route 53 Active-Passive Failover with Alias Records and Target Health Evaluation
Bu soruyu puanla