Design Walmart Product Search

Quick Overview

Design the architecture for Walmart Product Search. Cover scalability, storage, caching, and real-time requirements.

Walmart
System Design
Machine Learning Engineer
Walmart
Machine Learning Engineer
Technical Screen
System Design
Hard

14


Design the architecture for Walmart Product Search. Cover scalability, storage, caching, and real-time requirements.

Product search is central to Walmart's e-commerce experience, so ML engineering loops use it to test both retrieval infrastructure and relevance thinking at catalog scale. The interviewer checks how you handle indexing, low-latency query serving, caching and fresh price and stock data.

What the Interviewer Expects
  • Clarify functional requirements: keyword search, filters, autocomplete, sorting
  • Estimate query volume, peak load and index size
  • Use an inverted index engine such as Elasticsearch with sharding and replicas
  • Keep price and availability fresh through an incremental indexing pipeline
  • Cache popular queries and autocomplete results with sensible invalidation
  • Discuss relevance ranking and how search logs feed it
Key Topics to Cover
Inverted index
Elasticsearch sharding
Autocomplete
Caching
Incremental indexing
Relevance ranking
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How would you keep out-of-stock items from ranking at the top?
  • How would you add a learning-to-rank model on top of keyword retrieval?
  • How would you support semantic or misspelled queries?
  • How do you handle a sudden spike for a trending product during a sale?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional Requirements

  • Search Functionality: Users should be able to search products by keywords, categories, and filters (price, brand, ratings).
  • Autocomplete Suggestions: As users typ...
Capacity Estimation

Back-of-Envelope Calculations

  • User Base: Assume Walmart has 100 million active users.
  • Search Queries: If each user performs an average of 5 searches per day, that results in 500 million ...

Submit Your Answer
Markdown supported

Related Questions