Design Search Autocomplete for the Walmart Shopping App
Last updated: November 29, 2026
Quick Overview
Design the typeahead service that suggests queries and products as a customer types into the walmart.com or app search bar. Suggestions must return in under 50 ms and reflect trending items and the shopper's local store.
Walmart Labs
November 29, 20260
0
0 solved
Design the typeahead service that suggests queries and products as a customer types into the walmart.com or app search bar. Suggestions must return in under 50 ms and reflect trending items and the shopper's local store.
Search is the main entry point into a catalog of hundreds of millions of items, and typeahead quality has a measurable effect on conversion. Interviewers want a candidate who can build the offline suggestion corpus, an in-memory prefix index, and a ranking layer that blends popularity with locality and personalization.
What the Interviewer Expects
- Define suggestion sources: past queries, categories, brands, products
- Build the candidate corpus offline with filtering and dedup
- Serve from an in-memory prefix structure with top-k per node
- Re-rank with lightweight signals like store availability and recency
- Cover latency budget, caching and debouncing on the client
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 keep offensive or trademark-violating queries out of suggestions?
- How would you surface a sudden trend, such as a viral toy, within an hour?
- How do you support Spanish and misspellings?
- How would you A/B test a new ranking?
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
Return up to 8 suggestions for each prefix, p99 under 50 ms server-side, peak around 200k requests per second during holiday sales. Suggestions blend query completions ("paper tow" to "paper towels bo...
High-Level Design
Offline: a daily Spark job aggregates search logs over the last 30 days with decay weighting, keeps queries with enough distinct users and a non-zero click or add-to-cart rate, normalizes text, re...