A news agency hosts a dynamic web application on Amazon EC2 instances behind an Application Load Balancer (ALB). During breaking news events, traffic spikes significantly, occasionally causing backend database exhaustion and HTTP 503 Service Unavailable errors. The agency has created a static backup site in an Amazon S3 bucket. A solutions architect must design a highly resilient caching solution that automatically serves this static backup content globally with the lowest latency when the primary ALB is unavailable or failing. Which solution meets these requirements with the least operational complexity?
- Configure an Amazon CloudFront distribution with an origin group containing the ALB as the primary origin and the S3 bucket as the secondary origin. Set the origin group to fail over to the S3 bucket on 500, 502, 503, and 504 HTTP status codes.Cevap
- BConfigure an Amazon Route 53 failover routing policy with health checks, directing traffic to the ALB as the primary endpoint and to the S3 bucket configured for static website hosting as the secondary endpoint.
- CDeploy AWS WAF in front of the ALB. Configure a custom Web ACL rule to intercept HTTP 503 error codes from the ALB and redirect the user's web browser to the backup S3 bucket URL.
- DSet up an Amazon CloudFront distribution with the ALB as the origin. Configure the default cache behavior with a Time to Live (TTL) of zero so that all requests are forwarded directly to the origin, allowing Route 53 to handle the failover routing.
Cevap
Configure an Amazon CloudFront distribution with an origin group containing the Application Load Balancer as the primary origin and the S3 bucket as the secondary origin, setting failover status codes to redirect traffic to the S3 bucket.
The correct solution uses an Amazon CloudFront origin group. By setting the Application Load Balancer as the primary origin and the Amazon S3 bucket as the secondary origin, CloudFront automatically catches HTTP server errors (such as 503 Service Unavailable) at the edge and routes requests to the backup S3 bucket. This provides automatic failover with minimal latency, leverages edge caching, and avoids client-side DNS propagation delays.
Adım Adım Çözüm
Anahtar Kavram
CloudFront Origin Groups allow solutions architects to configure origin failover for high availability and resilient content delivery.
Tahmini Süre:1m 30s