A software-as-a-service (SaaS) provider hosts a financial analytics dashboard on AWS. The static assets of the dashboard are stored in an Amazon S3 bucket. The backend application runs on Amazon EC2 instances in private subnets behind an Application Load Balancer (ALB) and retrieves market analytics data from an Amazon Aurora PostgreSQL database. During periods of high market volatility, users experience slow dashboard loading times, and the database CPU utilization spikes due to a high volume of read queries for identical market data. Which two actions should a solutions architect recommend to optimize response times and reduce the load on the database? (Select TWO.)
- Configure an Amazon CloudFront distribution with the Amazon S3 bucket as the origin to cache and serve the static assets.Answer
- Implement Amazon ElastiCache for Redis in front of the Aurora PostgreSQL database to cache query results.Answer
- CCreate an Amazon CloudFront distribution for the static assets, and configure a cache behavior with the Minimum TTL, Maximum TTL, and Default TTL set to 0.
- DExport frequently queried market analytics reports to an Amazon S3 Standard-Infrequent Access (S3 Standard-IA) bucket and update them every 15 minutes for users to download directly.
- EConfigure the EC2 instances to retrieve static assets from the S3 bucket through a NAT Gateway to ensure low-latency internal data path delivery.
Answer
The solutions architect should configure an Amazon CloudFront distribution with the Amazon S3 bucket as the origin to serve static assets, and implement Amazon ElastiCache for Redis in front of the Aurora PostgreSQL database to cache query results.
Caching static content at edge locations using CloudFront minimizes user retrieval latency and reduces overall origin load. Caching database queries using ElastiCache for Redis offloads repetitive read requests from Aurora, dramatically reducing database CPU usage during peak traffic.
Step-by-Step Solution
Key Concept
Multi-tier caching using CloudFront for edge content delivery and ElastiCache for database query caching.