HLD prep is optimised for larger screens
Open on a laptop or desktop (1024px+) for the diagram canvas and the section sidebar side-by-side.
Design Search Autocomplete (Google / YouTube Suggest)
HLDProblem Understanding
Restate the problem in your own words.
Design Search Autocomplete (Google / YouTube Suggest)
Design a typeahead / search-autocomplete service: as the user types each character, return the top 5–10 matching completions (queries, products, places) ranked by frequency or relevance, with sub-100 ms latency at keystroke-level QPS (every keystroke is a query). The hard parts are the trie / inverted-index data structure, frequency updates as queries flow in, regional + personalised ranking, and absorbing spikes during news events when one query dominates the head.
- Google Search autocompleteThe canonical example — personalised, regional, language-aware completions ranked by frequency + recency.
- Amazon searchProduct autocomplete with inventory + relevance signals; conversion-tuned, not pure-frequency.
- YouTube searchTitle + topic autocomplete on top of a 100M+ video catalog with trending boosts.
- AlgoliaHosted typeahead used by thousands of e-commerce sites; sub-50 ms p99 globally.
Your task: read the problem above, then write what the system is, who uses it, the rough scale, and the headline UX expectation — in your own words. Submit for AI review when you're ready.
Click any step in the sidebar to jump around — sections don't have to be done in order. Press ? any time to see all shortcuts.