Problem
Design a typeahead system that returns ranked search completions for user-typed prefixes
- Serve queries in under 100ms p99 while handling 60K QPS
- Refresh rankings every 15–30 minutes without blocking live queries
- Absorb traffic spikes from hot prefixes by replicating the full index
Key Test Points
- In-memory Trie with per-node top-K caching
- Atomic Trie snapshot swaps
- Hot-prefix caching
Spot an issue or have a suggestion?