Earlier quoted context omitted.
Browsing HN only needs one round-trip (fetch the HTML), maybe two if you don't have it cached (fetch the CSS). Many apps need more round-trips, by loading assets sequentially. For example: fetch the HTML, then the JS, then the JS downloads its config, then the JS fetches some assets. Latency accumulates with every round-trip.
No, HN is not just one request, it is 7. And no, latency does not accumulate. Because the browser requests assets in parallel as it loads the html. Also, assets can easily be routed through a CDN.
Noticing when an app is only hosted in us-east-1
31–40 of 193 posts
Re: Noticing when an app is only hosted in us-east-1
#32The speed of light in a fiber optic cable is slower than light in a vacuum, about 2.14e8 m/s. If you feel latency, it's probably not the one-direction or round-trip latency, but rather the MANY round trips that are typically required for an HTTP request. DNS is probably 2 round trips (CNAME then A), and that has to cross the ocean via your resolver of choice (8.8.8.8 or whatever) to get to the authoritative server if…
Re: Noticing when an app is only hosted in us-east-1
#33Earlier quoted context omitted.
Browsing HN only needs one round-trip (fetch the HTML), maybe two if you don't have it cached (fetch the CSS). Many apps need more round-trips, by loading assets sequentially. For example: fetch the HTML, then the JS, then the JS downloads its config, then the JS fetches some assets. Latency accumulates with every round-trip.
No, HN is not just one request, it is 7. And no, latency does not accumulate. Because the browser requests assets in parallel as it loads the html. Also, assets can easily be routed through a CDN.
For those curious, it's /, then css, js, then 2 svgs, 1 ico (favicon) and 1 1x1 gif. None over 10k over the wire (/ is ~40k before compression)
Re: Noticing when an app is only hosted in us-east-1
#34Re: Noticing when an app is only hosted in us-east-1
#35I've been doing this long enough that I remember when all the big web sites were hosted in California. In fact, my company had its web farm in Sunnyvale which we managed over frame relay from Atlanta. Whenever I'd visit the west coast, I was shocked how much faster the web seemed. So I sympathize with the sentiment. Thing is though, the entire web feels pretty sluggish to me these days. And that's with us-east-1 less…
Re: Noticing when an app is only hosted in us-east-1
#36Earlier quoted context omitted.
Browsing HN only needs one round-trip (fetch the HTML), maybe two if you don't have it cached (fetch the CSS). Many apps need more round-trips, by loading assets sequentially. For example: fetch the HTML, then the JS, then the JS downloads its config, then the JS fetches some assets. Latency accumulates with every round-trip.
No, HN is not just one request, it is 7. And no, latency does not accumulate. Because the browser requests assets in parallel as it loads the html. Also, assets can easily be routed through a CDN.
At least on newer browsers we're no longer universally loading a javascript interpreter written in javascript (though sometimes we still are!)
Re: Noticing when an app is only hosted in us-east-1
#37I don't buy this. Hacker News is one of the most responsive websites I know. And it is run on a single server somewhere in the USA. While I am in Europe. If you have users in Sydney, Australia ... ... you are floored at 104ms of latency for your request When I open AirBnB with a clean browser cache, it takes several seconds until I see something useful. Those 104ms of latency don't make a dent. Reddit takes over 5 se…
I don't think most service cache data that isn't normally used in that region. In my experience I noticed that Twitter, YouTube, and Facebook feel sluggish when you are viewing Japanese content from Singapore compared to viewing the same content in Japan, etc.
Re: Noticing when an app is only hosted in us-east-1
#38Earlier quoted context omitted.
Latency absolutely does accumulate for code as the parent described that cannot make a request until the previous one has returned (images linked from css files for example, or a spa with poorly chunked code). There is a lot of that code out there. "Modern" tooling and practices reduce that, but it not a solved problem for the majority of legacy code.
You describe the issue of dependencies. You don't need modern tooling to prevent it. A server side build step to combine assets only makes things worse. Because on first load you get bombed with a giant blob of code you don't need. Or the developers get lost in the complexity of it and it becomes a giant hairball of chaos. The Twitter homepage takes 185 requests to load. AirBnB 240. Reddit 247. Look at the source cod…
But not all sites and apps can do that, and almost certainly not for all functionality and pages. Bloat isn't just about tooling, it's organisational too. Lots of teams all working within one product.
Modern ES modules can actually be worse if not bundled on on the server or by a build system. The browser doesn't know what to request until it starts parsing the previous response, that dependency tree can be large. That literally is accumulating latency. However with progressive improvement it's not much of an issue, but again not everyone can do that.
On top of that anyone still on HTTP 1.2 will only be doing ~5 requests to the same domain in parallel.
Point is, latency does accumulate, but it doesn't have to with well designed code structure, "modern" (rediscovered 90s) techniques, and modern browser features like preload and preconnect.
Re: Noticing when an app is only hosted in us-east-1
#39I don't buy this. Hacker News is one of the most responsive websites I know. And it is run on a single server somewhere in the USA. While I am in Europe. If you have users in Sydney, Australia ... ... you are floored at 104ms of latency for your request When I open AirBnB with a clean browser cache, it takes several seconds until I see something useful. Those 104ms of latency don't make a dent. Reddit takes over 5 se…
Re: Noticing when an app is only hosted in us-east-1
#40I don't buy this. Hacker News is one of the most responsive websites I know. And it is run on a single server somewhere in the USA. While I am in Europe. If you have users in Sydney, Australia ... ... you are floored at 104ms of latency for your request When I open AirBnB with a clean browser cache, it takes several seconds until I see something useful. Those 104ms of latency don't make a dent. Reddit takes over 5 se…
HN front page isn't filled with garbage and loaded with a million lines of pointless javascript like all other sites you mentioned. HN front page is 27 kb in size while, for example, reddit is 943 kb. Performance issues with websites are entirely a self-made problem. There are plenty of fast, lean and yet very functional web pages like HN that prove that prove it.