| ▲ | P99 0 ms* autocomplete for 240M domain names(ruurtjan.com) | ||||||||||||||||||||||||||||||||||
| 28 points by dbalatero 2 hours ago | 15 comments | |||||||||||||||||||||||||||||||||||
| ▲ | skybrian 7 minutes ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
This autocomplete suggests domains that don't exist. You can just type garbage and it will suggest something, but then if you go there, there are no records. It seems like one purpose of an autocomplete box is help you avoid typos, so that makes it less useful. | |||||||||||||||||||||||||||||||||||
| ▲ | kevmo314 15 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
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! | |||||||||||||||||||||||||||||||||||
| ▲ | ViscountPenguin an hour ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
Unfortunately this approach doesn't feel that great down here in Australia, definitely a function of latency. I think you could get a lot closer by framing this as an optimization problem, where you use the full alphabet dictionary, but add a residual prediction which aims to cover as much of the remaining domain name tree as possible weighted by popularity. This tree could then be pre-baked and stored with the same system. This would probably get you p99 0ms even in Australia. | |||||||||||||||||||||||||||||||||||
| ▲ | camel_gopher an hour ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
Clever but that’s not how we measure latency. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | pixelpoet 23 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
Pretty sure we mean < 1ms rather than actually instantaneous. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| ▲ | pupppet 39 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
Autocomplete aside, this is a pretty nifty tool. | |||||||||||||||||||||||||||||||||||
| ▲ | bagels 23 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
Looks more like 500ms? | |||||||||||||||||||||||||||||||||||
| ▲ | ChannelFence 28 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||
its pretty clever but what happns when someone pastes a domain or uses IME or voice input? the api being that fast is still impressive. | |||||||||||||||||||||||||||||||||||
| ▲ | cortesoft 34 minutes ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
KeyDown events don’t work great for mobile, though. | |||||||||||||||||||||||||||||||||||