ORIGINAL SYSTEM DESIGN QUESTION
Product catalog search
Search products by text, category and price while preserving stock freshness.
Original exercise · intermediate. Editorial role relevance does not imply a company has asked this question.
Requirements and constraints
- Five million products; 5,000 queries/second; 500 updates/second.
- Search may be eventually consistent but checkout must validate live stock.
- State assumptions and justify security, cost, operational ownership and data retention.
Pressure round
An index update is delivered out of order after a price change.
Build and explain the design
Requirements & scope
Who uses it? What must it do? What is explicitly out of scope? State latency, durability and privacy goals.
Self-review guidance
Define the actors, required operations and out-of-scope behavior. Explicit requirement: Search may be eventually consistent but checkout must validate live stock.
Capacity estimates
State assumptions, peak requests/second, data volume and retention. Show your arithmetic and units.
Self-review guidance
Use this workload: Five million products; 5,000 queries/second; 500 updates/second. Convert rates and payload sizes into peak compute/storage assumptions; show units, headroom and what remains unmeasured.
APIs & data model
Describe endpoints/events, entity keys, indexes, authorization, and idempotency.
Self-review guidance
Define index documents, facets, versioned updates and relevance explanations.
Architecture & data flow
Describe components and request/event paths. Use plain text arrows to sketch your design; explain each responsibility.
Self-review guidance
Separate search index reads from transactional inventory authority.
Failures & observability
What happens on overload, duplicate events, partial failures or lost dependencies? Discuss monitoring and recovery.
Self-review guidance
Pressure-test: An index update is delivered out of order after a price change. Describe bounded recovery, deduplication, observability and a user-visible failure state.
Tradeoffs & alternatives
Compare two plausible approaches. State the costs, consistency model and what would make you change the design.
Self-review guidance
Compare asynchronous indexing with synchronous write latency and stale-search disclosure.
Design guidance describes assumptions and tradeoffs; no architecture has been simulated or benchmarked.
Practice this question
Save your work privately, explain decisions and return to your revision queue.
Open practice workspaceBrowse the question library →