Soru

Zorluk: OrtaAmazon CloudFront Caching, Origins, and Security

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.)

  1. 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
  2. Update the cache behavior of the CloudFront distribution to point to the newly created origin group as the origin.Cevap
  3. C
    Configure Route 53 CNAME records pointing to the CloudFront distribution at the zone apex to automatically resolve traffic to the healthy ALB endpoint.
  4. D
    Configure 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

1
Define both Application Load Balancers as origins under the CloudFront distribution settings.
Two separate origins are configured in the distribution.
Before grouping origins for failover, each origin must be defined individually.
2
Create an origin group, specifying the us-east-1 ALB as the primary origin and the us-west-2 ALB as the secondary origin, and select the HTTP 502 and 504 status codes to trigger failover.
An origin group is configured with failover criteria on specific HTTP status codes.
This establishes the failover relationship and conditions (502 and 504 status codes).
3
Modify the default cache behavior (or appropriate path-specific cache behavior) to target the newly created origin group.
The distribution routes viewer traffic to the origin group instead of a single origin.
CloudFront requires cache behaviors to map to the origin group to utilize failover capabilities.

Anahtar Kavram

CloudFront Origin Failover using Origin Groups
Bu soruyu puanla