Question

Difficulty: MediumEdge Caching and Content Delivery for Resilient Architectures

A company hosts a public REST API for real-time weather telemetry data on Amazon ECS behind an Application Load Balancer (ALB) in the us-east-1 Region. The telemetry data is updated every 5 minutes. To support a global user base, the company needs to minimize latency, protect the ECS backend from traffic spikes, and ensure high availability by automatically routing traffic to a standby ECS deployment in the us-west-2 Region if the primary Region experiences an outage. Which architecture should a solutions architect recommend to meet these requirements with the LEAST operational overhead?

  1. Configure an Amazon CloudFront distribution with an origin group. Set the us-east-1 ALB as the primary origin and the us-west-2 ALB as the failover origin. Configure a cache behavior with a TTL of 5 minutes.Answer
  2. B
    Configure an Amazon CloudFront distribution with a single origin pointing to an Amazon Route 53 latency-based routing DNS record. Create Route 53 latency records with health checks pointing to the ALBs in both regions.
  3. C
    Configure an Amazon CloudFront distribution pointing to the us-east-1 ALB. Associate an AWS WAF web ACL with a custom rule that redirects traffic to the us-west-2 ALB when it detects HTTP 5xx errors from the primary ALB.
  4. D
    Configure an Amazon CloudFront distribution with an origin group containing the us-east-1 ALB as primary and the us-west-2 ALB as failover. Set the cache behavior Minimum TTL, Maximum TTL, and Default TTL to 0.

Answer

Configure an Amazon CloudFront distribution with an origin group. Set the us-east-1 ALB as the primary origin and the us-west-2 ALB as the failover origin. Configure a cache behavior with a TTL of 5 minutes.
The correct configuration uses an Amazon CloudFront origin group with the primary Application Load Balancer as the primary origin and the standby Application Load Balancer as the failover origin. This native CloudFront feature allows for seamless, low-latency failover at the edge on specific HTTP status codes. Setting a 5-minute TTL optimizes performance for global users and shields the backend ECS containers from traffic spikes by caching the telemetry data.

Step-by-Step Solution

1
Analyze caching requirements
Since telemetry data updates every 5 minutes, caching it for 5 minutes (300 seconds) at CloudFront edge locations will significantly reduce backend load and improve performance.
This satisfies the constraint of protecting the ECS backend from traffic spikes while serving low-latency data to global users.
2
Analyze regional resiliency requirements
Identify that CloudFront origin groups allow setting up active-passive failover with primary and standby ALBs across different regions.
This configuration automatically redirects client requests to the secondary origin if the primary origin returns specific HTTP 5xx error codes or connection timeouts, without relying on DNS propagation delays.
3
Evaluate and eliminate incorrect routing and firewall configurations
Eliminate solutions that rely on DNS-level failover for CloudFront origins (due to DNS caching) or misapply AWS WAF for traffic routing.
These alternatives either fail to provide rapid, reliable failover or use services outside their intended scope.

Key Concept

Amazon CloudFront Origin Groups and Edge Caching
Rate this question