Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
Loading the question…
While this loads — quick one
Every subscriber must get each event. A queue, or pub/sub?
System design interview question
Google's search box, Amazon's, every app's: “design typeahead” asks you to answer every keystroke of every user within a few milliseconds. It tests whether you can move the expensive work off the typing path and still keep suggestions fresh. Here is how to walk into it, and then how to practise it until the answer is yours.
Practise Search Typeahead
Free with an account.
As a user types into a search box, the product shows the most likely completions after each keystroke — and it has to come back within a few milliseconds, or the suggestions feel laggy and get ignored. Completions are ranked by how often each phrase has been searched before, and the catalogue of phrases is large. The read volume is enormous: every keystroke from every user is a lookup, and most of those lookups are for the same short, popular prefixes. Building and ranking the list of completions is done in the background, not on the typing path.
Every phrase that matters in the brief is a requirement in disguise. Spot them before you draw a single box.
“come back within a few milliseconds”
Hot prefixes answered from memory so keystrokes feel instant.
“ranked by how often each phrase has been searched before”
A prefix search that returns matching phrases in popularity order.
The same design always gets the same score, with the reason behind every requirement — then defend it against the trade-offs above.
The answers are not on this page on purpose. Build the design, and these are asked — and marked — once it is submitted.
© 2026 PlayCloudLabs. All rights reserved. Not affiliated with Amazon Web Services.