DBS-C01 · Question #289
A media company hosts a highly available news website on AWS but needs to improve its page load time, especially during very popular news releases. Once a news page is published, it is very unlikely t
The correct answer is D. Use ElastiCache for Redis with write-through and long time to live (TTL). For a highly available news website with rarely changing content requiring improved page load times, the recommended caching strategy is Amazon ElastiCache for Redis with a write-through approach and a long Time To Live (TTL).
Question
A media company hosts a highly available news website on AWS but needs to improve its page load time, especially during very popular news releases. Once a news page is published, it is very unlikely to change unless an error is identified. The company has decided to use Amazon ElastiCache. What is the recommended strategy for this use case?
Options
- AUse ElastiCache for Memcached with write-through and long time to live (TTL)
- BUse ElastiCache for Redis with lazy loading and short time to live (TTL)
- CUse ElastiCache for Memcached with lazy loading and short time to live (TTL)
- DUse ElastiCache for Redis with write-through and long time to live (TTL)
How the community answered
(25 responses)- A8% (2)
- B4% (1)
- C12% (3)
- D76% (19)
Why each option
For a highly available news website with rarely changing content requiring improved page load times, the recommended caching strategy is Amazon ElastiCache for Redis with a write-through approach and a long Time To Live (TTL).
While write-through and long TTL are good, Memcached is a simpler cache and lacks the advanced features, persistence, and replication capabilities of Redis, making Redis a more robust choice for a 'highly available' website.
Lazy loading (cache-aside) would mean the first request for a newly popular page would experience a cache miss and slower performance, which is undesirable during peak news releases. A short TTL would also lead to frequent cache expiration for rarely changing content, reducing the overall cache hit rate.
Lazy loading and short TTL would both result in suboptimal performance. Lazy loading means initial access is slower, and a short TTL forces frequent re-fetching of content that rarely changes, counteracting the goal of improving page load times for static content.
Using Amazon ElastiCache for Redis with a write-through strategy ensures that when a news page is published, it is immediately written to both the database and the cache, guaranteeing cache freshness for newly published content. A long Time To Live (TTL) is appropriate because news pages are unlikely to change, maximizing cache hit rates and improving page load times for popular, static content. Redis is chosen for its robustness, persistence, and replication capabilities, supporting the highly available nature of the news website.
Concept tested: ElastiCache caching strategies for static content
Source: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/WhatIs.html
Topics
Community Discussion
No community discussion yet for this question.