Caching and Redis interview questions

Cache-aside and write strategies, invalidation, stampedes, TTL jitter, eviction, HTTP and CDN caching, Redis data structures and durability.

6 quick facts

– interview-ready · 12 questions in this topic

– of 12 tried

Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.

Questions

  1. Cache-aside: the default caching patternOrder the steps
  2. Write-through, write-behind and write-aroundPick the fix
  3. Keeping a cache consistent with the databaseOrder the steps
  4. Cache stampede on a hot keyPick the fix
  5. Spreading expiries with TTL jitterPredict
  6. Eviction: LRU, LFU and maxmemoryPredict
  7. HTTP caching headersPick the fix
  8. What to put behind a CDNPick the fix
  1. Choosing Redis data structuresPredict
  2. Scaling a cache cluster and hot keysPick the fix
  3. Cache penetration and negative cachingPredict
  4. Redis durability: RDB, AOF and when Redis is a databasePick the fix

Practise this topic

Flashcards · 18

Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.

Quick quiz · 12 questions

One exercise per question, checked as you go. Needs JavaScript.

Mock interview · 2 sets

Timed, out loud, then tick what you covered. Needs JavaScript.

Quick facts

Recall the answer first, then tap Show to check.

Sources: Topic outline informed by System Design Primer by Donne Martin and the Zalando RESTful API Guidelines, both licensed under CC BY 4.0. Every question and answer is written by Best Latest Apps. Credits and license