System Design · Senior · Question 19 of 75

How do you scale search suggestions (typeahead) to millions of requests per second?

Explanation

Popular prefixes and their suggestions (a trie or key-value) are updated offline from query logs, and responses are cached on the CDN and in the browser. The client reduces requests with debounce, cancellation and a local prefix cache.

Further reading

Problem with a question

System Design · Senior · question 19

Test yourself

Take the System Design · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz