Code RoomPopular articles cache
EasyPrep Room Coding #3669

Popular articles cache

System designDistributed systemsEntry–Mid~25 min

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.

Clarify3:00 left
Estimate3:00 planned
Design8:30 planned
Deep dive6:30 planned
Failure4:00 planned
0:00
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.