AWS Developer DVA-C02 · Troubleshooting and Optimization · easy

A backend application uses Amazon ElastiCache for Redis in front of an Amazon RDS PostgreSQL database. Whenever the application requests a user profile, it checks Redis first; on a cache miss, the application queries RDS, writes the returned row into Redis with a TTL (Time to Live) of 300 seconds, and returns the profile. What is this caching pattern called, and what is its main trade-off compared to Write-Through caching?

Published · Last updated · checked before publication — how we verify questions

Options

  • AWrite-Through caching; it guarantees zero cache misses on initial cold start
  • BDynamoDB Accelerator (DAX) write-sharding; it only works with NoSQL key-value stores
  • CLazy Loading (Cache-Aside); it caches requested items with a cache-miss penaltyCorrect answer
  • DCloudFront Origin Shield; it caches TCP database connections at DNS edge locations

Answer: C. Lazy Loading (Cache-Aside); it caches requested items with a cache-miss penalty

Checking the cache first and populating it from the database only on a cache miss is Lazy Loading (Cache-Aside). Its advantage is that only requested data is cached (avoiding cache pollution), while its trade-offs are a cache-miss latency penalty on the first read and potential stale data until TTL expiration unless paired with write-through or invalidation.

Why the other options are wrong

  • A. Write-Through caching; it guarantees zero cache misses on initial cold start — The described flow populates the cache on a read miss (Lazy Loading), not on every database write (Write-Through).
  • B. DynamoDB Accelerator (DAX) write-sharding; it only works with NoSQL key-value stores — DAX is exclusively for Amazon DynamoDB, whereas this architecture uses ElastiCache for Redis in front of RDS PostgreSQL.
  • D. CloudFront Origin Shield; it caches TCP database connections at DNS edge locations — CloudFront caches HTTP/HTTPS responses at CDN edge locations, not Redis key-value rows.

All Troubleshooting and Optimization questions and the topic overview →

AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.