System design interview questionMediumProximity / Trie
Design a Search Autocomplete System
Design search autocomplete: as the user types, return top prefix suggestions fast.
Interview scope
Client → LB/Gateway → App → Cache (hot prefixes) + DB (dictionary source of truth). No Client → DB/Cache.
Functional requirements
- Given a prefix, return a small list of suggestions (top-k).
- Suggestions should update as the query string grows.
- Optional ranking by popularity (high level).
Scale and quality goals
- Latency must feel instant (tens of ms ideal).
- Read-heavy: many queries per keystroke across users.
- Hot prefixes should be cached at the edge/app tier.
Capacity assumption
Design for this scale
Assume ~10M DAU typing ~20 queries/day with ~5 keystrokes each → huge read QPS; design for cache hits.
Practice more than a diagram
Place components on the Froquiz canvas, connect the data flow, and see which decisions the scenario-specific review finds missing. The full exercise and review unlock with Premium.
Explore Premium →