AWS Certified Solutions Architect - Associate / Question #1347 of 1019

Question #1347

A company hosts a three-tier ecommerce application on AWS. The frontend is served from Amazon S3, integrated with an API hosted on EC2 instances behind an Application Load Balancer. The API serves static assets and dynamic requests, with backend processors handling orders asynchronously. The company expects a sudden surge in traffic during holiday sales and wants to ensure all requests are processed efficiently.

What should a solutions architect recommend to handle the traffic spike effectively?

A

Use Amazon CloudFront to cache dynamic content. Manually increase the number of EC2 instances before the event.

B

Use Amazon CloudFront to cache static content. Configure an Auto Scaling group for EC2 instances scaling based on CPU utilization.

C

Use Amazon CloudFront to cache dynamic content. Deploy an Amazon ElastiCache cluster to store session data and reduce API load.

D

Use Amazon CloudFront to cache static content. Implement Amazon SQS to queue incoming orders for asynchronous processing by EC2 workers.

Explanation

Answer D is correct because:
1. CloudFront for Static Content: Caching static assets (e.g., images, CSS) at the edge reduces latency and offloads traffic from EC2 instances, freeing them to handle dynamic requests.
2. SQS for Asynchronous Processing: Queuing orders via SQS decouples the API from backend processing. During traffic spikes, orders are stored in the queue and processed by EC2 workers at a sustainable rate, preventing overload.

Why other options are incorrect:
- A: Manual scaling is error-prone and not scalable for sudden traffic spikes. Caching dynamic content with CloudFront is ineffective as it changes frequently.
- B: While Auto Scaling helps, relying solely on CPU metrics may not address backend order-processing bottlenecks. It does not decouple the API from backend workloads.
- C: Caching dynamic content is unsuitable, and ElastiCache addresses session management but does not directly handle order-processing scalability.

Key Points:
- Use CloudFront for static content caching.
- Use SQS to decouple and manage asynchronous workloads during traffic surges.
- Auto Scaling alone may not resolve backend processing bottlenecks.

Answer

The correct answer is: D