Code Room
System designHardsd-g065
Subject CachingLevel Senior–Staff~45 minCommon in Distributed systems interviewsIndustries Technology, Software development

Question

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.

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.