A multinational e-commerce company serves a dynamic product recommendation API to users globally. The API is hosted on Application Load Balancers (ALBs) in two AWS Regions: a primary region in eu-west-1 and a secondary standby region in us-east-1. The company uses an Amazon CloudFront distribution to cache recommendation payloads at edge locations. To ensure high availability, the company needs to configure automated failover to the secondary region's ALB only if the primary ALB returns HTTP 502 (Bad Gateway) or HTTP 503 (Service Unavailable) status codes. The solution must minimize operational complexity, maintain edge caching benefits, and avoid client-side DNS propagation delays. Which architecture should a solutions architect recommend to meet these requirements?
- Configure a CloudFront Origin Group containing the primary ALB as the primary origin and the secondary ALB as the failover origin, setting the failover criteria to include HTTP 502 and 503 status codes.Cevap
- BConfigure an Amazon Route 53 latency routing policy with health checks to resolve the API domain name to either the primary or secondary ALB directly, bypassing CloudFront caching.
- CAssociate an AWS WAF Web ACL with the CloudFront distribution, and configure a custom rule to intercept HTTP 502 and 503 responses from the primary ALB and rewrite the origin request header to the secondary ALB.
- DConfigure the CloudFront distribution behavior to set the minimum, maximum, and default TTL values to zero, and configure CloudFront custom error pages for HTTP 502 and 503 responses to redirect to the secondary ALB.