Soru

Zorluk: ZorEdge Caching and Content Delivery for Resilient Architectures

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?

  1. 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
  2. B
    Configure 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.
  3. C
    Associate 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.
  4. D
    Configure 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.

Cevap

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.
The correct solution uses an Amazon CloudFront Origin Group containing the primary ALB as the primary origin and the secondary ALB as the failover origin, configured to trigger failover on 502 and 503 status codes. This ensures that CloudFront automatically and transparently redirects requests to the secondary region if the primary region encounters server issues, maintaining edge caching for successful requests and avoiding DNS-based failover delays.

Adım Adım Çözüm

1
Analyze the requirements for low-latency delivery, high availability, edge caching preservation, and failover based on backend HTTP 502/503 status codes.
The solution must leverage CloudFront to maintain edge caching and fail over to a backup ALB without relying on DNS-based redirection, which introduces propagation delays.
This establishes the architectural boundary where caching must remain active at the edge, and failover must occur dynamically at the CDN layer.
2
Evaluate Amazon CloudFront Origin Groups as the native mechanism for origin failover.
An Origin Group allows grouping a primary origin (primary ALB) and a secondary origin (secondary ALB), with automated failover triggered when the primary origin returns specific HTTP status codes.
This directly meets the failover criteria (HTTP 502 and 503) with minimal operational overhead and near-instant failover.
3
Assess and eliminate alternative solutions such as Route 53 routing, AWS WAF, and TTL reduction.
Route 53 bypasses CloudFront caching; AWS WAF cannot route origins; TTL reduction to zero disables edge caching completely.
This confirms that only the Origin Group option achieves all design constraints (resiliency, performance, and low operational complexity).

Anahtar Kavram

Implementing Amazon CloudFront Origin Groups for automated origin-level failover of dynamic HTTP endpoints.
Bu soruyu puanla