ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 301 - DBS-C01 discussion

Report
Export

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?

A.
Use ElastiCache for Memcached with write-through and long time to live (TTL)
Answers
A.
Use ElastiCache for Memcached with write-through and long time to live (TTL)
B.
Use ElastiCache for Redis with lazy loading and short time to live (TTL)
Answers
B.
Use ElastiCache for Redis with lazy loading and short time to live (TTL)
C.
Use ElastiCache for Memcached with lazy loading and short time to live (TTL)
Answers
C.
Use ElastiCache for Memcached with lazy loading and short time to live (TTL)
D.
Use ElastiCache for Redis with write-through and long time to live (TTL)
Answers
D.
Use ElastiCache for Redis with write-through and long time to live (TTL)
Suggested answer: A

Explanation:

The recommended strategy for this use case is option A: use ElastiCache for Memcached with write-through and long time to live (TTL).

Amazon ElastiCache is a fully managed in-memory data store service that supports two open source engines: Memcached and Redis. Amazon ElastiCache can be used to improve the performance and scalability of web applications by caching frequently accessed data in memory, reducing the load and latency of database queries.

Memcached and Redis have different features and use cases. Memcached is a simple, high-performance, distributed caching system that supports a large number of concurrent connections and large object sizes. Redis is an advanced, feature-rich, in-memory data structure store that supports data persistence, replication, transactions, pub/sub, Lua scripting, and various data types.

For this use case, Memcached is more suitable than Redis because the news website does not need the advanced features of Redis, such as data persistence or replication. The news website only needs a fast and simple caching solution that can handle high traffic and large objects.

Write-through and lazy loading are two common caching strategies that determine when and how data is written to the cache. Write-through is a strategy that writes data to the cache whenever it is written to the database. Lazy loading is a strategy that writes data to the cache only when it is requested for the first time.

For this use case, write-through is more suitable than lazy loading because the news website needs to improve its page load time, especially during very popular news releases. Write-through ensures that the cache always has the most up-to-date data and avoids cache misses or stale data. Lazy loading may cause cache misses or stale data if the data is not cached or updated in time.

Time to live (TTL) is a parameter that specifies how long an item can remain in the cache before it expires and is deleted. TTL can be used to control the cache size and freshness.

For this use case, long TTL is more suitable than short TTL because the news website has a low probability of changing its data once a news page is published. Long TTL allows the data to stay in the cache longer and reduces the frequency of cache updates or evictions. Short TTL may cause unnecessary cache updates or evictions if the data does not change frequently.

Therefore, option A is the recommended strategy for this use case because it uses ElastiCache for Memcached with write-through and long TTL, which provides a fast and simple caching solution that can handle high traffic and large objects, and ensures that the cache always has the most up-to-date and relevant data.

asked 16/09/2024
Robert McConnell
32 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first