3 ms·
Yeah there's the network round trip and that is going to be the bulk of the time. You have to serve interactive apps from servers that are close to your users.
by jrockway 6y ago
Yeah there's the network round trip and that is going to be the bulk of the time. You have to serve interactive apps from servers that are close to your users.
DNS, even when censored by the government, should be cached by the client for the TTL. And, for interactive apps, you should keep the TCP connection open between requests. (Not really sure what the browser state of the art is here, but the idea behind HTTP/3 is to skip TCP entirely, and let the server control how long it remembers the state necessary to keep the session alive. One autocomplete request should be one UDP packet.)
I'll also point out that networks aren't very good. For example, I have a RTT of 50ms to Chicago, but the speed-of-light round trip between New York and London is 36ms. (For Chicago, it's 8ms!) At least on my setup, the vast majority of the time is spent waiting for a DOCSIS timeslot. Once my packet gets to the internet, it's pretty fast.
Remember, people are playing real-time shooting games over the Internet. If they can make that smooth, you can make your autocomplete smooth.