A company hosts a dynamic web application with a primary origin hosted on an Application Load Balancer (ALB) in the us-east-1 Region. To ensure high availability, the company deploys a secondary origin on another ALB in the us-west-2 Region. A SysOps administrator needs to configure Amazon CloudFront to automatically route traffic to the secondary ALB when the primary ALB returns HTTP 502 or 504 status codes. Which two configurations must the SysOps administrator implement to achieve this failover behavior? (Select TWO.)
- Create an origin group in the CloudFront distribution that includes the primary ALB as the primary origin and the secondary ALB as the secondary origin.Cevap
- Update the cache behavior of the CloudFront distribution to point to the newly created origin group as the origin.Cevap
- CConfigure Route 53 CNAME records pointing to the CloudFront distribution at the zone apex to automatically resolve traffic to the healthy ALB endpoint.
- DConfigure an Amazon Route 53 Active-Passive failover routing policy with health checks to route traffic between the primary ALB and secondary ALB, and target this Route 53 record as the single origin for the CloudFront distribution.
Cevap
Create an origin group in the CloudFront distribution that includes the primary ALB as the primary origin and the secondary ALB as the secondary origin, and update the cache behavior of the CloudFront distribution to point to the newly created origin group as the origin.
To set up automatic failover between two Application Load Balancer origins in CloudFront based on HTTP status codes (such as 502 or 504), you must create an origin group. Within the origin group, you define the primary origin and the secondary origin, and specify the failover status codes. Next, you must associate the distribution's cache behavior with this origin group so that CloudFront knows to direct requests to it and trigger failover when those status codes are returned.
Adım Adım Çözüm
Anahtar Kavram
CloudFront Origin Failover using Origin Groups