SpinTheMic
Pro

Interview practice question

Low-level design of a key-value store with TTL

Backend Engineering · OOP and Design Patterns · Experienced

Design an in-memory key-value store that supports get, set with expiry and delete.

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Map key → value + expiry.
  • Lazy expiry on read.
  • Active cleanup: min-heap or sampling.
  • Thread safety (striped locks/concurrent map).
  • Memory limits and eviction policy.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics