Caching easy
What happens to a database immediately after a cache server restart (Cold Cache)?
- A The total database load drops to zero as the system gracefully degrades to a read-only maintenance state.
- B The database experiences an immediate spike in traffic because every incoming request results in a critical cache miss.
- C The database management system automatically initiates a background synchronization to proactively warm the cache.
- D All incoming application requests are queued in the worker pool until the cache has been fully repopulated.
Answer: B. The database experiences an immediate spike in traffic because every incoming request results in a critical cache miss.
Without the cache absorbing reads, 100% of the traffic hits the database immediately. This phenomenon, known as the **Thundering Herd** (or Cold Cache Stampede), can cause a database outage if the database layer is not provisioned to handle the full peak load of the application.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In the Cache-Aside pattern, what happens when the application requests data that is missing from the cache (a 'Cache Miss')?
- Why use a centralized Distributed Cache (like a Redis Cluster) over local in-memory caches on each web server?
- Setting a short TTL (e.g., 60 seconds) on a cached object helps to:
- What is the primary architectural goal of introducing a cache into a system?
- Most caching systems rely on the principle of 'Temporal Locality', which states:
- Your cache uses an LRU (Least Recently Used) eviction policy. When the cache is full, which item is removed?