DVA-C02 Question 388
Single answerA company is running a web application that experiences high read traffic for certain database queries. To improve performance and reduce load on the database, the company wants to implement a caching solution. Which of the following approaches would be the MOST effective and cost-efficient?
- A
Use Amazon ElastiCache to cache frequently accessed data in memory.
- B
Enable Amazon RDS Read Replicas to handle the additional read traffic.
- C
Store the frequently accessed data in Amazon S3 and use it as a cache.
- D
Use AWS Lambda to dynamically generate cache data on each request.
Show answer and explanation
Correct answer: A
Explanation
The most effective and cost-efficient solution for reducing database load and improving performance for high-read traffic workloads is to implement an in-memory caching layer. Amazon ElastiCache, which supports both Redis and Memcached, is purpose-built for this use case and provides extremely low-latency access to cached data. Other options, such as RDS Read Replicas or Amazon S3, are not designed to serve as caching solutions and may not meet the performance or cost requirements.
- A. Correct.
Amazon ElastiCache is a fully managed in-memory caching service that is specifically designed for high-performance, low-latency caching needs. It is the most effective and cost-efficient solution for this scenario.
- B. Incorrect.
Amazon RDS Read Replicas can help with read-heavy workloads, but they are not a caching solution and can still introduce latency compared to an in-memory cache like ElastiCache.
- C. Incorrect.
Amazon S3 is a highly durable object storage service, but it is not designed to function as a high-performance caching layer due to higher latency compared to in-memory solutions.
- D. Incorrect.
Using AWS Lambda to dynamically generate cache data on each request is not a caching solution. It would increase latency and cost since data is being computed or fetched dynamically for every request.