Soru

Zorluk: OrtaEdge Caching and Content Delivery for Resilient Architectures

A company hosts a dynamic web application on Amazon EC2 instances behind an Application Load Balancer (ALB) in the us-east-1 Region. The company wants to improve the application's performance for global users by caching static content. Additionally, they need to ensure high availability by serving a static maintenance page from an Amazon S3 bucket in the us-west-2 Region if the ALB returns HTTP 502 or 504 errors. The solution must minimize latency for global users, automate the failover process, and minimize operational complexity. Which configuration should a solutions architect implement to meet these requirements?

  1. A
    Configure an Amazon Route 53 latency routing policy with health checks pointing to both the ALB in us-east-1 and the S3 bucket in us-west-2 to distribute traffic and fail over during outages.
  2. B
    Create an Amazon CloudFront distribution with the ALB as the origin. Configure an AWS WAF web ACL with custom rules to inspect response codes and redirect client requests to the S3 bucket when the ALB returns 502 or 504 status codes.
  3. Create an Amazon CloudFront distribution. Configure an Origin Group containing the ALB as the primary origin and the S3 bucket as the secondary origin. Set the failover criteria to include status codes 502 and 504.Cevap
  4. D
    Create an Amazon CloudFront distribution with the ALB as the origin. Configure the Cache Behavior with a Minimum TTL and Default TTL of 0 seconds for all paths, and write a custom Lambda@Edge function to intercept origin response errors and redirect users to the S3 bucket.

Cevap

The correct answer is to create an Amazon CloudFront distribution and configure an Origin Group containing the ALB as the primary origin and the S3 bucket as the secondary origin, setting the failover criteria to include status codes 502 and 504.
The correct answer is to configure an Amazon CloudFront distribution with an Origin Group. CloudFront Origin Groups allow you to specify a primary origin and a secondary failover origin. When the primary origin returns specific HTTP status codes such as 502 or 504, CloudFront automatically routes traffic to the secondary origin (the S3 bucket) to serve the static maintenance page. This solution provides edge caching to reduce latency globally, implements automatic failover, and has low operational complexity.

Adım Adım Çözüm

1
Analyze the requirements for edge caching, latency reduction, and automatic failover.
Identify that Amazon CloudFront is the best service to reduce global latency through edge caching, and that failover must handle 502 and 504 error codes from the Application Load Balancer.
CloudFront caches content at edge locations globally, reducing latency, and native failover is required to handle origin errors.
2
Evaluate native high-availability features of Amazon CloudFront.
Determine that CloudFront Origin Groups allow setting up a primary origin (ALB) and a secondary origin (S3 bucket) with failover criteria for specific HTTP status codes.
Using native CloudFront Origin Groups eliminates the need for complex DNS-level failover or custom Lambda@Edge code, reducing operational complexity.
3
Select the correct configuration that combines caching and resilient origin failover.
Create an Origin Group with the primary origin pointing to the ALB and the secondary origin pointing to the S3 bucket, configuring failover for 502 and 504 status codes.
This configuration meets the performance requirements by caching content at the edge and satisfies the resiliency requirements by automatically serving a static maintenance page if the ALB is unhealthy.

Anahtar Kavram

Edge caching and resilient origin failover using Amazon CloudFront Origin Groups
Tahmini Süre:2m 0s
Bu soruyu puanla