Recall & Review
beginner
What is distributed caching and why is it used in system design?
Distributed caching is a method to store data across multiple cache servers to improve data retrieval speed and reduce load on databases. It helps systems scale and handle more users by keeping frequently accessed data closer to the application.
Click to reveal answer
beginner
Name two popular distributed caching systems and one key difference between them.
Redis and Memcached are popular distributed caching systems. Redis supports data persistence and advanced data structures, while Memcached is simpler and focuses on fast in-memory key-value storage without persistence.
Click to reveal answer
intermediate
How does cache invalidation work in distributed caching?
Cache invalidation is the process of removing or updating cached data when the original data changes. In distributed caching, this ensures that stale data is not served. Techniques include time-to-live (TTL), explicit invalidation commands, or event-driven updates.
Click to reveal answer
intermediate
What is cache sharding and why is it important?
Cache sharding splits the cache data across multiple servers based on keys. It helps distribute load evenly, improves scalability, and avoids a single cache server becoming a bottleneck.
Click to reveal answer
intermediate
Explain the difference between cache-aside and write-through caching strategies.
Cache-aside means the application loads data into the cache only when needed (on cache miss). Write-through means data is written to the cache and the database at the same time. Cache-aside reduces unnecessary cache writes, while write-through ensures cache and database are always consistent.
Click to reveal answer
Which of the following is a key feature of Redis but not Memcached?
✗ Incorrect
Redis supports data persistence to disk, while Memcached does not.
What does cache sharding help to achieve?
✗ Incorrect
Cache sharding splits data across multiple servers to balance load and improve scalability.
In cache-aside strategy, when is data loaded into the cache?
✗ Incorrect
Cache-aside loads data into cache only when the application requests data not found in cache.
Which technique helps prevent serving stale data in distributed caches?
✗ Incorrect
Cache invalidation removes or updates outdated cached data to keep cache fresh.
Memcached is best described as:
✗ Incorrect
Memcached is designed for fast, simple caching without data persistence.
Describe how distributed caching improves system performance and scalability.
Think about how having data closer to the application helps.
You got /5 concepts.
Explain the differences between Redis and Memcached and when you might choose one over the other.
Consider features and use cases.
You got /5 concepts.