System Design · Junior · Question 17 of 75

Why use debounce in search-as-you-type?

Explanation

Without debounce, the word "sneakers" produces 8 requests. A 200–300 ms delay reduces server load. Additionally, stale requests are cancelled (AbortController) so an old response doesn't overwrite a new one, and results are cached.

Further reading

Problem with a question

System Design · Junior · question 17

Test yourself

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

Take this quiz