Skewed-access cache eviction

DesignHard45 min

Your task

Design the eviction and admission policy for a large in-memory object cache (hundreds of GB across nodes) with a highly skewed access pattern: a small set of objects is hot, a huge long tail is accessed once, and scans (e.g., a crawler or analytics job) periodically sweep millions of cold keys. Plain LRU performs badly here. Explain what eviction/admission policy you'd use and why, and how you keep a scan from flushing the hot set.

It covers

  • Eviction
  • Memory pressure
  • Admission