AWS Certified Developer – Associate — Question 217
A company has a two-tier application that consists of a frontend application and an Amazon RDS for MySQL database. The frontend application retrieves data from the database. The data consists of postal codes and their associated geographic coordinates The application performs many more database reads than writes. The application retrieves each postal code from the database thousands of times each day.
A developer must improve the performance of the application to decrease latency.
Which change should the developer make to the application to meet these requirements?
Answer options
- A. Modify the application to use a lazy loading caching strategy with a small TTL value.
- B. Modify the application to use a write-behind caching strategy.
- C. Modify the application to use a write-through caching strategy.
- D. Modify the application to use a lazy loading caching strategy with a large TTL value.
Correct answer: D
Explanation
The correct answer is D because using a lazy loading caching strategy with a large TTL value allows frequently accessed postal codes to be stored in cache, reducing the need for repeated database queries and thereby decreasing latency. Option A's small TTL would lead to frequent cache misses, while options B and C are not ideal for scenarios with more reads than writes.