An enterprise runs a critical web application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB) in the us-east-1 Region. The database tier uses an Amazon Aurora PostgreSQL Global Database with the primary cluster in us-east-1 and a secondary cluster in us-west-2. The company wants to improve their disaster recovery (DR) strategy to achieve a Recovery Time Objective (RTO) of 15 minutes and a Recovery Point Objective (RPO) of 1 minute. The company deploys a standby application tier in us-west-2. During a recent database outage in us-east-1, the application instances remained healthy but could not connect to the database. Because Route 53 was configured to only monitor the ALB endpoint health, DNS failover to us-west-2 did not trigger. Which architectural modification will meet these requirements and automate failover during database degradation?
- Implement an application-level health check endpoint (such as `/health`) on the Amazon EC2 instances that queries the Aurora database. Configure a Route 53 active-passive failover routing policy with a Route 53 health check monitoring the primary ALB pointing to the health check endpoint. Create an Amazon CloudWatch Alarm for the health check failure to trigger an AWS Lambda function that invokes the global database failover API to promote the secondary cluster in the recovery Region.Answer
- BCreate a Route 53 active-passive failover routing policy pointing to the primary ALB in the primary Region and the secondary ALB in the recovery Region. Configure an AWS Lambda function to continuously poll the Aurora PostgreSQL database cluster status. If the primary cluster degrades, the Lambda function will promote the secondary cluster in the recovery Region and update the Route 53 DNS records manually via the Route 53 API.
- CImplement an application-level health check endpoint on the Amazon EC2 instances that checks Aurora database connectivity. Configure Route 53 active-passive failover routing policy with a Route 53 health check monitoring the primary ALB. Create a Route 53 Private Hosted Zone (PHZ) in the primary AWS account to resolve internal database endpoints, but do not associate the PHZ with the VPC in the recovery Region. Configure a Lambda function to promote the secondary Aurora cluster when the health check fails.
- DModify the disaster recovery strategy to use a pilot light model by keeping the secondary Aurora PostgreSQL cluster in a stopped state to reduce ongoing database costs. Configure a Route 53 failover routing policy with a health check on the primary ALB. Upon health check failure, configure an AWS Lambda function to start the secondary Aurora PostgreSQL cluster and then perform a database promotion.