Skip to content
All interviews

Distributed cache

Design a Memcached/Redis-style cache tier that absorbs most reads for a database. The hard parts are not the hash map: they are partitioning, hot keys, invalidation races and what happens when a cache node restarts empty.

Notes and ratings save in this browser. Completing self-assessment records your progress.

45:00

Requirements checklist

Clarifying questions
  • What is the database's read capacity, and the peak read rate?
  • How stale may cached data be?
  • Value sizes and working-set size?
  • Is the cache a pure cache, or do some features rely on it as storage?

requirements

Suggested time: about 6 minutes. States the database's capacity as the real constraint on hit rate.