Live data from Hacker News

Noticing when an app is only hosted in us-east-1

blog.jonlu.ca

81–90 of 193 posts

Re: Noticing when an app is only hosted in us-east-1

#81
post #2

It shows up if you need a CDN pretty clearly when you monitor uptime from around the world. The response time for Bitbucket for example is: 100ms from us-east 300ms from us-west 400ms from eu-central 600ms from tokyo 800ms from sydney (numbers from OnlineOrNot)

Actually I just built a tool to visualise this if you want to check it out:

https://onlineornot.com/do-i-need-a-cdn?url=https://bitbucke...

Re: Noticing when an app is only hosted in us-east-1

#82

Earlier quoted context omitted.

>> has to make 40 requests pulling in js files, CSS files fonts So it's 2023 and I've been concatenation all my css, and all my js, into a single css and js request since like 2005. So a call to the site results in maybe 3 or 4 requests, not 40. But I've noticed most sites don't do this. Perhaps because I was trained when we had 28k modems not 100mb fibre? Http/2 makes a big deal of multiplexing, but its less convinc…

Remember back in the old days when people used to concatenate images into imagemaps and specify the coordinates and dimensions? One image file for a whole site. Same goes back when we could just load a single library from the Google public version (cough-jquery-cough) and then all the on-page JS was just in-tag handlers. Not that it was better but boy howdy was it faster to load.

Not just in the old days, if you ever need to target super slow devices with web tech this sort of optimisation is still needed. I've used Spritesmith (https://www.npmjs.com/package/spritesmith) to good effect, there are probably others too.

Re: Noticing when an app is only hosted in us-east-1

#83

Earlier quoted context omitted.

People should use their ISP's DNS as well which is often <5ms. I've never bothered using an off-net DNS provider for this reason given how much faster is it to use an on-net caching DNS resolver provided by my ISP.

It depends on the competency of your ISP and how aggressive they are about so-called features. In several cases, the ISP provided DNS decided not to return NX results and instead returned a page of ads which was great for email servers, back in the day. The other failure mode I've seen is that the ISP's DNS servers are overloaded and take several seconds to respond.

Several cases is no enough reason for me to avoid ISP DNS by default, many if not most ISP don’t spoof NXDOMAIN and provide fast DNS.

Re: Noticing when an app is only hosted in us-east-1

#84
post #8

I 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…

The reason HN loads in... 500ms in EU is that it takes exactly two roundtrips to load: One HTML blob, one render-blocking CSS. Rest is fast-ish abroad is because it takes exactly 2 somewhat lean roundtrips to load over the same TLS connection: One HTML blob, one CSS file, and the latter is cachable. There is JS, but it is loaded at the end. That is a hell of a lot better than the average website. When the CSS is cach…

I don't work in the webspace so genuinely curious... are things generally still cached between website visits? I thought that was effectively non-existant now a days b/c of fingerprintability. I'm pretty sure at least for JS it's the case. CSS is different?

Re: Noticing when an app is only hosted in us-east-1

#85
post #81
post #2

It shows up if you need a CDN pretty clearly when you monitor uptime from around the world. The response time for Bitbucket for example is: 100ms from us-east 300ms from us-west 400ms from eu-central 600ms from tokyo 800ms from sydney (numbers from OnlineOrNot)

Actually I just built a tool to visualise this if you want to check it out: https://onlineornot.com/do-i-need-a-cdn?url=https://bitbucke...

Do they test full rendering time or only RTT? Also it would be useful to know IP addresses from which test request are being made. Tested a site hosted in Hetzner and got 135ms latency from Frankfurt which is unexpectedly high. Ping RTT from some US east networks to this site is around 120-150ms, how it shows the same latency within DE?

Re: Noticing when an app is only hosted in us-east-1

#86
post #62

Earlier quoted context omitted.

Remember back in the old days when people used to concatenate images into imagemaps and specify the coordinates and dimensions? One image file for a whole site. Same goes back when we could just load a single library from the Google public version (cough-jquery-cough) and then all the on-page JS was just in-tag handlers. Not that it was better but boy howdy was it faster to load.

The original Space Jam (1996) site does this for navigation (and it still works fine): https://www.spacejam.com/1996/cmp/jamcentral/jamcentralframe...

I just checked, and no it doesn't. The icons in the navigation are separate .gif files.

edit to add: And this makes a large part of the load time (when not cached). Other than that, the largest part is the SSL handshake and the fact that the server seems to be a bit slow (WRT the fact that it serves static content; 200ms for dynamic stuff would be okay).

Still a lot faster than most of todays websites.

Re: Noticing when an app is only hosted in us-east-1

#87

Earlier quoted context omitted.

The reason HN loads in... 500ms in EU is that it takes exactly two roundtrips to load: One HTML blob, one render-blocking CSS. Rest is fast-ish abroad is because it takes exactly 2 somewhat lean roundtrips to load over the same TLS connection: One HTML blob, one CSS file, and the latter is cachable. There is JS, but it is loaded at the end. That is a hell of a lot better than the average website. When the CSS is cach…

There is no reason why most sites can't return one pregenerated static HTML blob. The number of async requests is a killer.

I mean, there's a reason ajax took off in the first place. Member having to reload the entire page on every user interaction? Member iframes? Member flash and silver light and java applets?

With stuff like web sockets/Web rtc /whatever new awesome sauce is out today a lot of that has changed, but that's still really the same spirit of ajax anyway, just with actual persistent connections instead of hacking it with long polling.

You can write a shitty system regardless of paradigms used.

You can write a beautiful system even with painful primitives.

All it comes down to is how much time and talent you're willing to invest, which is admittedly a cliche and non answer, but true nonetheless.

Re: Noticing when an app is only hosted in us-east-1

#88

Earlier quoted context omitted.

Remember back in the old days when people used to concatenate images into imagemaps and specify the coordinates and dimensions? One image file for a whole site. Same goes back when we could just load a single library from the Google public version (cough-jquery-cough) and then all the on-page JS was just in-tag handlers. Not that it was better but boy howdy was it faster to load.

You're probably thinking of CSS sprites, if you mean only displaying a certain portion of the image file at a time. An image map is when you display the whole image file as-is, but have different clickable links at different coordinates/dimensions. The former is specifically for reducing requests, while the latter is more about UX.

I'm actually conflating both, you're right. I'm thinking of sprite-ed CSS, but also the really really old style imagemap where the same image could be clickable in multiple areas for different purposes.

Re: Noticing when an app is only hosted in us-east-1

#89
post #84

Earlier quoted context omitted.

The reason HN loads in... 500ms in EU is that it takes exactly two roundtrips to load: One HTML blob, one render-blocking CSS. Rest is fast-ish abroad is because it takes exactly 2 somewhat lean roundtrips to load over the same TLS connection: One HTML blob, one CSS file, and the latter is cachable. There is JS, but it is loaded at the end. That is a hell of a lot better than the average website. When the CSS is cach…

I don't work in the webspace so genuinely curious... are things generally still cached between website visits? I thought that was effectively non-existant now a days b/c of fingerprintability. I'm pretty sure at least for JS it's the case. CSS is different?

Resources are cached within the same origin. So HN resources will be cached and used on HN visits. But if two different sites load a library from the same CDN, they will not share their caches with each other and will both load it separately.

Re: Noticing when an app is only hosted in us-east-1

#90
post #4

The 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…

Your post is a good read for everyone trying to calculate number of RTT solely on the HTTP layer, which is done so often, but always wrong.

To add to your post, don't forget TCP congestion window scaling, which will add some more roundtrips - this mostly depends on the size and bandwidth of the ressources, so smaller sites like HN have an advantage here. Especially if the initial ressources fit within the initcwnd (10*MSS, usually around 15kb). But this, like many of the parameters you mentioned, are highly flow- and also software specific, it becomes so hard to make meaningfull predictions.

Post reply on HN