0
0
HLDsystem_design~5 mins

Distributed caching (Redis, Memcached) in HLD - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
AData persistence
BIn-memory key-value storage
CSimple caching
DDistributed cache
What does cache sharding help to achieve?
ABackup cached data
BEncrypt cached data
CCompress cached data
DDistribute cache data across servers
In cache-aside strategy, when is data loaded into the cache?
AOnly on cache miss
BEvery time data is written
CPeriodically by the cache server
DNever
Which technique helps prevent serving stale data in distributed caches?
ALoad balancing
BData compression
CCache invalidation
DData encryption
Memcached is best described as:
AA file storage system
BA simple, fast in-memory key-value store without persistence
CA message queue system
DA persistent database
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.