AWS Certified Developer – Associate — Question 376
A developer needs to implement a cache to store data that an application frequently queries from an Amazon RDS for MySQL database. The data structures that will be cached include sets and sorted sets.
How should the developer implement the cache to achieve the LOWEST latency?
Answer options
- A. Create an Amazon ElastiCache for Memcached instance. Serialize the data as JSON before caching the data.
- B. Create an Amazon ElastiCache for Redis instance. Use a Redis client library to cache the data.
- C. Create an Amazon DynamoDB table. Serialize the data as JSON before caching the data.
- D. Create an Amazon ElastiCache for Memcached instance. Use a Memcached client library to cache the data.
Correct answer: B
Explanation
Amazon ElastiCache for Redis natively supports advanced data structures such as sets and sorted sets, allowing the application to query and manipulate them with sub-millisecond latency. Amazon ElastiCache for Memcached does not support these complex data types natively, requiring overhead for serialization and deserialization which increases latency. Amazon DynamoDB is a NoSQL database rather than an in-memory cache, making it less suitable for achieving the absolute lowest latency compared to ElastiCache.