Design: Distributed Cache — Concept Check
Questions on Design: Distributed Cache. A distributed cache (Redis Cluster, Memcached) spreads cached data across multiple nodes using consistent hashing. It must handle cache invalidation, eviction, replication, and the thundering herd problem.
Questions in this quiz
7 questions on Design: Distributed Cache — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A distributed cache system is experiencing high traffic on a single key, causing performance issues. Which solution can help mitigate this problem?
- AUse a local in-process cache
- BIncrease the cache's memory
- CReplicate the key to multiple nodes
- DDisable cache eviction
2.In a distributed cache, what problem arises when a popular key expires and many requests hit the database simultaneously?
- AThundering herd problem
- BData inconsistency
- CCache poisoning
- DCache invalidation
3.A cache system uses consistent hashing for data partitioning. What is the primary benefit of this approach?
- AEnsures data is always fresh
- BSimplifies cache invalidation
- CPrevents cache misses
- DMinimizes data movement during node changes
4.A service using a distributed cache is experiencing frequent cache misses. Which strategy can help reduce these misses?
- ADisable replication
- BImplement cache-aside pattern
- CUse a smaller TTL
- DIncrease the number of replicas
5.When using Redis Cluster, what happens if a client sends a request to the wrong node?
- AThe client receives a MOVED redirect
- BThe node processes the request anyway
- CData is automatically replicated
- DThe request is silently dropped
6.What is a potential downside of using mutex locks to solve the thundering herd problem?
- AIncreased cache misses
- BIncreased latency due to waiting
- CData inconsistency
- DHigher memory usage
7.Which eviction policy is commonly used in distributed caches like Redis to manage memory usage?
- AFirst In First Out (FIFO)
- BMost Recently Used (MRU)
- CRandom Replacement
- DLeast Recently Used (LRU)