A product-catalog API repeatedly runs the same read queries against RDS, and database CPU and connections spike when a sale starts.
Product data can be tens of seconds stale, and the application can implement a caching layer.
Which architecture is most appropriate?
Place Amazon ElastiCache in a cache-aside flow and use TTL so cache hits avoid RDS while misses load and populate the cache.
Detailed explanation
A CDN cache setting alone cannot safely model application data consistency and user-specific response conditions.
A CDN cache setting alone cannot safely model application data consistency and user-specific response conditions.
Cache hits avoid RDS, while misses read from RDS and populate the cache for the configured TTL, reducing database load during read spikes.
Cache hits avoid RDS, while misses read from RDS and populate the cache for the configured TTL, reducing database load during read spikes.
Logs help investigation but do not reduce repeated queries or connection pressure on the database.
Logs help investigation but do not reduce repeated queries or connection pressure on the database.
A queue supports asynchronous work but does not provide immediate read responses or query-result caching.
A queue supports asynchronous work but does not provide immediate read responses or query-result caching.
Check official documentation
Compare the following points with the official documentation.
Amazon ElastiCacheのlazy loading、cache-aside、TTLに関する公式説明を確認する。
Official references
What to confirm
キャッシュヒット・ミスの流れとTTLが、DB負荷とデータ鮮度へ与える影響を説明できる。
Key points
- Amazon ElastiCache
- Cache-aside
- Cache hit
- TTL
- Data freshness
Notes
- Environment: AWS公式SOA-C03試験ガイドとAWS公式ドキュメントの確認
- Confirm the behavior in the official SOA-C03 guide and Amazon ElastiCache documentation.
Foundation review
Hit and miss paths
A hit reduces backend reads; a miss fetches authoritative data and usually repopulates the cache.
Freshness trade-off
A shorter TTL improves freshness but can increase backend traffic, while a longer TTL improves reuse but permits older values.