Typeahead: ten suggestions before the next keystroke
One strong interview answer to "design typeahead search": two systems in one, an online path that does a single in-memory lookup from a replicated 10 GB snapshot, and an offline path that ranks queries by decayed popularity and hourly trends, filters them, and precomputes the top ten for every prefix; plus the client tricks, the CDN, and how to ship a snapshot safely.
01 · Two systems in one
IP-09 · Design Typeahead Search (Autocomplete)
Ten suggestions, before the next letter.
Ten suggestions, instantly
Type s y s into a search box, and ten suggestions appear before your finger reaches the next key.
0:00 / 13:06