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

Question #1405

A video streaming platform operates a multi-tier application on AWS. The frontend and recommendation engine tiers run on Amazon EC2, while the user database is hosted on Amazon RDS for PostgreSQL. The recommendation engine frequently queries the database for identical user preference datasets, resulting in performance bottlenecks and increased latency.

Which solution will most effectively optimize the recommendation engine's performance?

A

Implement Amazon SNS to store and manage the database query requests.

B

Implement Amazon ElastiCache to cache the frequently accessed user preference datasets.

C

Implement an RDS for PostgreSQL read replica to offload the repetitive database queries.

D

Implement Amazon Kinesis Data Firehose to batch-process the queries and reduce database load.

Explanation

The recommendation engine's performance bottleneck stems from repetitive queries for identical datasets. Amazon ElastiCache (option B) is ideal because it provides an in-memory cache (using Redis or Memcached) to store frequently accessed data, reducing the need to query the RDS database repeatedly. This decreases latency and offloads the database.

- Option A (SNS): SNS is a pub/sub service for messaging, not caching. It does not address query performance.
- Option C (RDS Read Replica): While read replicas offload read traffic, they still involve database queries, which are slower than in-memory caching.
- Option D (Kinesis Data Firehose): Designed for streaming and batch processing, not real-time query optimization.

Key Points: Use caching (ElastiCache) for repetitive, read-heavy workloads to reduce database load and improve response times. Avoid solutions that do not directly address query caching or introduce unnecessary complexity.

Answer

The correct answer is: B