Code Room
System designEasy
Question
Design a read cache in front of a database for a small site whose home page shows the 'top 10 most popular articles'. Computing that list is a moderately expensive query, the home page is the most-visited page, and the ranking only needs to update every few minutes. Describe how you cache the result and keep it reasonably fresh.
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.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.