Question #2018
A company operates a blog platform on AWS, utilizing an Application Load Balancer, an Auto Scaling group of EC2 instances, and a Single-AZ Amazon RDS MySQL database. Users experience delays when loading blog posts, which are stored in infrequently updated tables. Monitoring shows high CPU usage on the RDS instance during peak traffic. What should the solutions architect do to enhance performance?
Migrate the blog posts to Amazon Aurora with read replicas and use the replicas for read operations.
Deploy Amazon ElastiCache for Redis to cache blog posts, implementing lazy loading.
Adjust the Auto Scaling group to increase EC2 instances when RDS CPU exceeds a threshold.
Enable Multi-AZ deployment for RDS and modify the application to reduce query frequency.
Explanation
Option B is correct because:
- ElastiCache for Redis offloads read traffic from the RDS instance by caching frequently accessed blog posts, reducing CPU usage.
- Lazy loading ensures the cache is populated only when data is requested, minimizing stale data and optimizing resource usage.
Other options are less effective:
- A: Migrating to Aurora with read replicas adds complexity and cost, and read replicas still require database queries.
- C: Scaling EC2 instances does not address the RDS CPU bottleneck and may increase database load.
- D: Multi-AZ improves availability but not performance, and reducing query frequency is vague compared to caching.
Key Points: Use caching (ElastiCache) for read-heavy, infrequently updated data to reduce database load. Lazy loading optimizes cache efficiency.
Answer
The correct answer is: B