Live data from Hacker News

Real-world HTTP/2: 400GB of images per day

99designs.com.au

51–60 of 72 posts

Re: Real-world HTTP/2: 400GB of images per day

#51
I thought that HTTP/2 didn't fix head-of-line blocking and this was why QUIC (https://www.chromium.org/quic) existed.

From the project page:

Key features of QUIC over existing TCP+TLS+HTTP2 include

* Dramatically reduced connection establishment time

* Improved congestion control

* Multiplexing without head of line blocking

* Forward error correction

* Connection migration

Re: Real-world HTTP/2: 400GB of images per day

#52
Comparing two protocols using different providers, isn't that a bit comparing pears and apples? And i have a doubt, which could be bad assumption, but that it is on hardware you control or own and what exactly runs on it, and potentially which other parties use it.

Re: Real-world HTTP/2: 400GB of images per day

#53
post #51

I thought that HTTP/2 didn't fix head-of-line blocking and this was why QUIC ( https://www.chromium.org/quic ) existed. From the project page: Key features of QUIC over existing TCP+TLS+HTTP2 include * Dramatically reduced connection establishment time * Improved congestion control * Multiplexing without head of line blocking * Forward error correction * Connection migration

IMHO HTTP/2 solves HOL blocking partly. It will allow other streams to proceed if one stream is blocked due to flow control (receiver doesn't read from the stream). E.g. if you have multiple parallel downloads over a single HTTP/2 connection one blocked/paused stream won't block the others.

However it doesn't have abilities that will allow individual streams to proceed if some packets are lost that only hold information for a single stream.

Re: Real-world HTTP/2: 400GB of images per day

#54
post #36

I did not do any real tests and I might be completely wrong etc. but it seems to me that http2 is going to perform poorly over wireless links like 3g. With http1 one had N tcp connections, and with the way tcp slowly increases the bandwidth used, and rapidly decreases it when packet is lost, even if any packet were dropped (which will happen quite a lot on 3g) other tcp streams were not delayed, or blocked, and can e…

I worry about TCP window scaling (and full TCP windows) when only using one TCP connection. There is a good reason download managers use multiple connections to download one file, because depending on the latency the maximum transfer rate is capped because only so many TCP packets can be in flight simultaneously. I wonder if nobody ever thought about that... HTTP1/x solved that (more by chance) with multiple connections...

Re: Real-world HTTP/2: 400GB of images per day

#55
post #26
post #16

One way to "solve" the time to visual completion would be to make all the images, but especially the larger images, progressive scan. For very large images, the difference in visual quality between 50% downloaded and 100% downloaded on most devices isn't noticeable, so the page would appear complete in half the time.

Doesn't that increase the file size though? They're looking at 3G load speeds, so any increase in file size is probably unwelcome.

Progressive JPG almost always smaller than generic one

Re: Real-world HTTP/2: 400GB of images per day

#56

Some solutions: - Serve less data. The best speedup is when there's no more data to download and if the throughput for clients is maxed out, then decreasing page weight helps. - Use async bootstrap JS code to load in other scripts once images are done loading or other page load events have fired. - Load less images in parallel, use JS to load one row of images at a time. - Use HTTP/2 push (which CloudFlare offers) to…

Wouldn't the standard solution of lazy loading images (and prioritizing critical css) help. Since they are now trying to load everything on a big page, they should only be trying to load everything above the fold.

Re: Real-world HTTP/2: 400GB of images per day

#57

We've recently moved to Google Cloud Storage from AWS because of http/2. We had a bottleneck of the browser waiting when serving multiple large (8+files * 10mb+each). I'm wondering if 99designs looked at any sort of domain sharding to get around the timing issues. If I understand correctly, wouldn't this get around the priority queue issue? Your js,fonts, etc. coming from a different address than your larger images,…

Domain sharding is anti pattern for http2. Reason being for another domain it needs to make an expensive TLS handshake. With http2 on the same domain, it doesn't. We've done tests and even moved away from even having a static domain.

Re: Real-world HTTP/2: 400GB of images per day

#58

Founder of NuevoCloud here. If I read this right, you guys used Cloudflare for http 2. So let me ask you this, when you did your comparison, were all of the images cached (ie: x-cache: hit) at the edge? The reason I ask is because cloudflare, last I checked, still hasn't implemented http2's client portion. So when a file is not cached, it does this: client edge node origin server. Http2 is only used for the short hop…

So does it matter for Cloudflare or affects my site's performance if I use http2 in the backend while behind Cloudflare?

Re: Real-world HTTP/2: 400GB of images per day

#59

Founder of NuevoCloud here. If I read this right, you guys used Cloudflare for http 2. So let me ask you this, when you did your comparison, were all of the images cached (ie: x-cache: hit) at the edge? The reason I ask is because cloudflare, last I checked, still hasn't implemented http2's client portion. So when a file is not cached, it does this: client edge node origin server. Http2 is only used for the short hop…

But origin hits are relatively rare, so it doesn't matter that much that it's not http2.

Re: Real-world HTTP/2: 400GB of images per day

#60

Earlier quoted context omitted.

although cloudflare doesn't manage caches on a per account basis. Each PoP has a single LRU cache that's used for all customers. In other words, even if you've primed it, your files may have been pushed out of the cache by a larger customer. In order to know this hasn't occurred, you really have to check the hit rate cloudflare is reporting (for static files that rarely change, this should be near or at 100%)... and…

>Each PoP has a single LRU cache that's used for all customers. Is this true for all tiers of paid accounts? Can someone from CF chime in here?

As recently mentioned by a CloudFlare employee in this post (https://news.ycombinator.com/item?id=11439582):

> We cache as much as possible, for as long as possible. The more requested a file, the more likely it is to be in the cache even if you're on the Free plan. Lots of logic is applied to this, more than could fit in this reply. But importantly; there's no difference in how much you can cache between the plans. Wherever it is possible, we make the Free plan have as much capability as the other plans.

This does not confirm the exact statement but at least points in this direction.

Post reply on HN