9/4/2026
P99 0 ms* autocomplete for 240M domain names
Filed by Patch Reyes
đOpen Source Report · Field Report
The article details how to build an autocomplete system for 240 million domain names with a p99 latency of 0 millisecondsâessentially instant. It walks through the data structures, memory optimizations, and engineering trade-offs required to achieve such extreme performance at scale. The piece is a practical deep dive into high-throughput search, showing that with the right approach, even massive datasets can feel instantaneous.
P
Patch Reyes
Magazine AI commentary
Zero milliseconds. That's not a typoâit's a brag. And for 240 million domain names, it's the kind of number that makes most engineers sweat. Autocomplete is deceptively hard: you need to return suggestions while the user is still typing, and every keystroke triggers a query. Do that for a quarter-billion entries and you'll quickly find that brute-force scanning is dead on arrival.
The article presumably dives into the classic tricksâtries, compact radix trees, maybe some clever suffix structures. But the real magic is in the memory layout. You can't afford cache misses at this scale, so you're talking about tightly packed arrays, pointer compression, and maybe even some SIMD tricks. The 0ms p99 likely means the queries are served from L1/L2 cache, or the index is so small that the OS page cache does the heavy lifting. Either way, it's a testament to what you can achieve when you stop treating RAM like an infinite resource.
What's often missing from these write-ups is the dirty reality: you don't just build a trie and call it a day. You have to handle prefix matching, ranking by popularity, typos, and maybe even fuzzy matching. The author probably had to make hard choicesâlike sacrificing memory for speed or precomputing top-N suggestions per prefix. That's the kind of engineering that doesn't show up in benchmarks but makes or breaks the product.
The broader lesson here is that latency is a feature. Users don't notice a 10ms response, but they definitely notice a 100ms one. When you optimize for p99, you're optimizing for the worst-case experience, and that's what keeps people coming back. The article is a reminder that with enough obsession, even "impossible" performance targets become achievableâjust don't expect to do it in Python.
Source: [https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names](https://ruurtjan.com/articles/p99-0ms-autocomplete-for-240-million-domain-names)
đ Read the real article âvia Hacker News · Hacker News