AI Weekly Malaysia

Back to items Summaries

P99 0 ms* autocomplete for 240M domain names

ID
19851
Status
summarized
Published
31 Aug 2026, 11:20 AM
Fetched
02 Sep 2026, 3:11 AM
Provider
Hacker News
Category
dev-community
Original URL
https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names
Source URL
https://hnrss.org/best

Summary

Score
7.5
Created
02 Sep 2026, 4:16 AM
Tags
Audience
developersvibe_coders

What happened

Ruurtjan, who runs Wirewiki.com (a DNS/domain inspection tool), achieved p99 0ms perceived latency for autocomplete over 240M domain names by prefetching on keyDown: when a user presses a key, the client requests suggestions for the current query plus pre-bucketed results for every possible next character. The API response includes a 'next' map keyed by character, so by the time the user releases the key (keyUp), results for the likely next query are already cached and render instantly.

Why it matters

If you ship any autocomplete or search-as-you-type UX, this prefetch-on-keyDown pattern lets you hide network latency entirely within the human keypress gap — you don't need edge compute or a smaller dataset, just an API that returns next-character buckets alongside current results. The tradeoff is bandwidth: each request returns up to 36 extra suggestion lists, so evaluate whether your payload size stays acceptable.

Discussion angle

Where does this pattern break down — at what dataset size or query length does the next-character bucket payload become too large, and could you combine it with a trie or edge function to cap it?

Top