Question

Difficulty: HardHigh-Performing Content Delivery and Caching Solutions

A financial technology company is launching a real-time portfolio dashboard application on AWS. The application serves dynamic user portfolio data and stock price charts that are updated every 60 seconds. The application backend is hosted on Amazon EC2 instances behind an Application Load Balancer (ALB), with an Amazon Aurora PostgreSQL database as the primary storage. During peak market hours, the database CPU utilization spikes due to repetitive queries fetching identical stock price metrics. The company needs to design a caching architecture that reduces the load on the database and minimizes latency for users globally. Which TWO actions should the solutions architect take to meet these requirements?

  1. Deploy an Amazon CloudFront distribution in front of the ALB, and configure a cache behavior for the stock price chart API path with a Minimum TTL and Maximum TTL of 60 seconds.Answer
  2. Configure Amazon ElastiCache for Redis to cache database query results of common read-heavy user portfolio queries using a cache-aside strategy.Answer
  3. C
    Configure Amazon CloudFront with both Minimum TTL and Maximum TTL set to 0 seconds in the cache behavior for static pricing assets to ensure clients always retrieve the latest data from the ALB.
  4. D
    Move the application's temporary short-lived static assets to an Amazon S3 bucket, and set up an S3 Lifecycle policy to transition them to Amazon S3 Standard-Infrequent Access (S3 Standard-IA) daily to reduce costs.
  5. E
    Configure Amazon Route 53 Latency Routing to distribute dynamic database queries directly to the Aurora read replicas to minimize latency, without configuring any health checks.

Answer

The correct actions are to deploy an Amazon CloudFront distribution in front of the ALB with the cache behavior's Minimum and Maximum TTL set to 60 seconds, and to configure Amazon ElastiCache for Redis to cache database queries using a cache-aside strategy.
The correct combination uses Amazon CloudFront to cache the stock price charts at edge locations for 60 seconds, which directly matches the data update frequency and protects the origin servers from redundant request processing. Additionally, deploying Amazon ElastiCache for Redis provides a dedicated, in-memory cache to store database query results, resolving the CPU utilization spikes on the primary Aurora database.

Step-by-Step Solution

1
Analyze the bottlenecks and identify caching layers.
Identify that stock price charts update on a predictable 60-second interval, and database CPU spikes are due to repetitive read-heavy portfolio queries.
This allows separation of presentation caching (edge delivery) from application database query caching.
2
Implement edge caching using Amazon CloudFront.
Create a CloudFront distribution pointing to the ALB. Set the cache behavior for the charts API to have a TTL of 60 seconds.
This offloads repetitive chart requests from the ALB and EC2 servers, serving them from the edge for global users.
3
Implement database caching using Amazon ElastiCache.
Deploy an ElastiCache for Redis cluster. Update the application to check Redis before querying the Aurora database, and write query results back to Redis on a cache miss.
This dramatically reduces read-heavy query execution load on the Aurora database and decreases query latencies to sub-milliseconds.

Key Concept

Implementing a multi-tiered caching architecture using Amazon CloudFront for edge content delivery and Amazon ElastiCache for database query acceleration.
Estimated Time:3m 0s
Rate this question