Lesson 11 of 15
34. Design Search Autocomplete (Typeahead)

34.10 What would you say in the last five minutes?

3 min read+10 XP

Step 6: Wrap-up (5 minutes)

  • Bottleneck: read traffic on short prefixes. Covered by browser, CDN and in-process caching, and a sharded in-memory store.
  • Single points of failure: the prefix store (replicas, and suggestions simply hide on failure); the build pipeline (the last good table keeps serving).
  • Quality and safety: blocklists, minimum counts, unique-user counting, manual removal tools with fast purge.
  • Next with more time: personalisation (blend in the user's own recent searches on the client), spelling correction ("dnue" → "dune"), multiple languages and scripts, and suggestions for book titles and authors as well as queries.

Memory code: "Fast because it's precomputed; fresh because it's blended; safe because it's filtered."