4 ms·
An instant page is one where a typical user click has the result fully rendered inside 100 milliseconds (almost imperceptible latency). That's an incredibly ha
by onion2k 4y ago
An instant page is one where a typical user click has the result fully rendered inside 100 milliseconds (almost imperceptible latency).
That's an incredibly hard to reach target. Establishing a secure connection from the browser to a server requires several round trips - 1 for DNS lookup, 1 for TCP handshake, 2 to establish the TLS connection, and 1 for the HTTP request. If you divide your 100ms perf budget equally between them that means your servers can be no more than 1800 miles away from the user using (100ms c) / 2 (for the round trip) / 5 requests*. Using TLS 1.3 removes one round trip which is definitely a good optimization. That's before you've even started any serverside rendering, session handling, db connections, etc.
Even with a really good edge network that's going to be incredibly hard to achieve.
I'd love it if every website served a page in 100ms, but it's never going to happen. I got https://ooer.com https://ooer.com down to below 500ms for myself (495ms last time I checked) after a fair bit of effect. Getting any lower would be a waste of time. Users can wait an extra 400ms.
- ryanisnan 4y agoI recommend the parent reads High Performance Browser Networking for a good overview of the latencies involved. Thanks for breaking it down here!
- londons_explore 4y agoThe 'typical user click' doesn't have to be the first page load... Depending on the application, many clicks might be from page to page in the web-app. And it's very possible for the majority of clicks to involve no server roundtrip at all.
- onion2k 4y agoHN readers will get quite cross with you if you recommend clientside rendering.
- initramfs 4y agoMy page loads in 174ms using GTmetrix.com, but I also don't really have a lot on my page. It's more of an experimental test. I was going to submit mine to their club but i don't have 100 points for mine yet https://news.ycombinator.com/item?id=33686805 https://news.ycombinator.com/item?id=33686805