Design Menu Caching with Fast Item Availability Invalidation
Last updated: November 29, 2026
Quick Overview
Design how DoorDash serves store menus to millions of browsing customers with low latency, while making sure that when a merchant marks an item out of stock or pauses the store, customers stop seeing it within seconds.
DoorDash
November 29, 20260
0
0 solved
Design how DoorDash serves store menus to millions of browsing customers with low latency, while making sure that when a merchant marks an item out of stock or pauses the store, customers stop seeing it within seconds.
Store pages are read-heavy and menus are large, but ordering an item that is sold out leads to a substitution or cancellation, which hurts customer trust and Dasher time. The interviewer is checking layered caching, invalidation strategy and the split between slow-changing and fast-changing data.
What the Interviewer Expects
- Split the menu into a large slow-changing body and a small fast-changing availability overlay
- Use layered caches (CDN, regional cache, service memory) with clear TTLs
- Drive invalidation from change events rather than only TTL
- Avoid cache stampedes on popular stores
- Revalidate at checkout as the correctness backstop
- Quantify hit rate and latency goals
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you handle store-specific prices for the same chain menu in different cities?
- What if a merchant toggles items hundreds of times a day through a POS integration?
- How would you cache personalized parts of the page such as reorder suggestions?
- How do you measure staleness in production?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
- Store page shows the menu: categories, items, prices, modifiers, photos. Menus range from 20 items to thousands for convenience stores.
- Reads: hundreds of thousands per second at dinner; p95 page ...
High-Level Design
- Menu service owns the canonical menu in a database and publishes
MenuUpdated(store_id, version)andAvailabilityChanged(store_id, item_ids)events. - Menu body: rendered to a compact J...