Soru

Zorluk: OrtaEdge Caching and Content Delivery for Resilient Architectures

A media distribution company serves static high-resolution graphics and dynamic personalized recommendations from a web application. The static assets are stored in an Amazon S3 bucket in the us-east-1 Region, with a cross-region replication bucket in the us-west-2 Region. The dynamic recommendations are generated by an Application Load Balancer (ALB) in us-east-1. The company wants to implement a solution that reduces latency for global users and provides automatic failover for the static assets if the primary S3 bucket becomes unavailable. Which two actions should a solutions architect take to meet these requirements?

  1. Create an Amazon CloudFront distribution. Configure an origin group with the S3 bucket in us-east-1 as the primary origin and the S3 bucket in us-west-2 as the secondary origin. Point the static cache behavior to this origin group.Cevap
  2. Configure the CloudFront distribution to use the ALB in us-east-1 as the origin for dynamic requests, and configure the dynamic cache behavior to forward cookies, headers, and query strings to the origin.Cevap
  3. C
    Configure a Route 53 latency routing policy with health checks to route static asset requests directly to either S3 bucket.
  4. D
    Configure the CloudFront cache behavior for static assets with a default Time to Live (TTL) of 0 seconds.
  5. E
    Configure AWS WAF on the Application Load Balancer to inspect requests and dynamically redirect users to the backup S3 bucket when the primary bucket is offline.

Cevap

To meet the requirements, the solutions architect should create an Amazon CloudFront distribution, configure an origin group with the primary S3 bucket as the primary origin and the secondary S3 bucket as the backup origin, and route the static cache behavior to this group. Additionally, the ALB should be configured as a CloudFront origin for dynamic requests, with the dynamic cache behavior forwarding headers, cookies, and query strings to the origin.
The correct actions involve configuring CloudFront with an origin group for the static assets, and setting up the ALB as an origin with a dynamic cache behavior that forwards necessary user context. CloudFront origin groups provide automatic failover for static content by switching to the backup S3 bucket in us-west-2 if the primary bucket in us-east-1 is down or returns errors. Forwarding cookies, headers, and query strings to the ALB ensures dynamic recommendations are processed correctly while using CloudFront's optimized network path to reduce latency.

Adım Adım Çözüm

1
Analyze the requirements for latency reduction and resiliency.
Identify that CloudFront is the appropriate service for global edge caching of static content and optimized routing of dynamic content.
CloudFront reduces latency by caching static assets at edge locations and routing dynamic traffic over the AWS global network.
2
Configure automatic failover for the static S3 origins.
Create a CloudFront origin group containing the us-east-1 S3 bucket as primary and the us-west-2 S3 bucket as secondary.
CloudFront origin groups automatically route requests to the secondary origin if the primary origin is unavailable or returns error status codes.
3
Configure dynamic request handling.
Add the ALB as an origin and configure a separate cache behavior for dynamic paths to bypass caching by forwarding query strings, cookies, and headers.
This allows personalized recommendation requests to reach the ALB directly while benefiting from CloudFront's optimized network routing.

Anahtar Kavram

Leveraging Amazon CloudFront origin groups for static asset failover and optimizing dynamic API performance by routing Application Load Balancer traffic through the edge network.
Tahmini Süre:2m 0s
Bu soruyu puanla