Overview
Design a suggestion service that returns the top five completions for a prefix within milliseconds, character by character as the user types.
Requirements
- 01Answer a prefix query in under 50ms on every keystroke
- 02Serve 100,000 queries a second at peak
- 03Return the top five suggestions ranked by past frequency and recency
- 04Update frequencies from a batch job and from a live stream of trending terms
- 05Stay up across globally distributed edge nodes
Concepts in play
TrieIn-MemoryPrefix SearchMapReduceEdge Caching