13. Caching at Scale
Interview questions
Interview questions (with the counter-questions you'll get)
Q1. What is a cache stampede, and how do you prevent it?
They're testing: a classic failure mode and real fixes.
Think about your answer first, then open it.
Q2. What's the difference between cache penetration, stampede and avalanche?
They're testing: precise vocabulary.
Think about your answer first, then open it.
Q3. How do you protect against requests for non-existent data?
They're testing: penetration defences, including security.
Think about your answer first, then open it.
Q4. One cache node is overloaded while the others are idle. Why, and what do you do?
They're testing: hot-key awareness.
Think about your answer first, then open it.
Q5. How would you design a distributed cache?
They're testing: sharding, replication and failure handling.
Think about your answer first, then open it.
Q6. How does a cache cluster handle a node failure?
They're testing: failover realism.
Think about your answer first, then open it.
Q7. What is cache warming, and when do you need it?
They're testing: operational practice.
Think about your answer first, then open it.
Q8. Explain Cache-Control, ETag and 304.
They're testing: HTTP caching basics.
Think about your answer first, then open it.
Q9. What would you monitor on a cache?
They're testing: operational maturity.
Think about your answer first, then open it.
Q10. The cache cluster went down during the sale. Walk me through what happens and what should protect you.
They're testing: designing for the worst case.
Think about your answer first, then open it.