Skip to content

Comment on P99 0 ms* autocomplete for 240M domain names

Comments

If you’d like to reduce the network latency further you can store each trie node as a file, naming it conveniently the prefix path to that node. Then dump the few hundred million files onto R2.

Now the traversal can be done completely via CDN lookups!

Cloudflare R2 doesn't distribute files globally. They only cache requested files in PoPs. So then it would function the same as an API behind the Cloudflare CDN.

It would skip the Cloudflare to server network hop that the author mentions being rather expensive for cache misses.

It would replace the Cloudflare to server network hop with a cloudflare PoP to R2 hop. That covers approximately the same geographical distance and results in similar latency.

(I'm the author btw)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.