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
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.
More Troubleshooting and Optimization questions
- A developer wants their AWS Lambda function to emit custom business metrics (OrderValue, CheckoutLatencyMs) alongside…
- An AWS Lambda function processes CPU-intensive image resizing and takes 4,000 ms (4.0 seconds) when configured with…
- An Amazon SQS standard queue has its default VisibilityTimeout set to 30 seconds. A worker EC2 instance polls the…
- A developer instruments a microservices payment API with the AWS X-Ray SDK. They want to attach custom key-value data…
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.