4 ms·
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 ima
by rgbrenner 10y ago
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 <--http2--> edge node <--http 1.1--> origin server.
Http2 is only used for the short hop between the client and edge node.. then the edge node uses http 1.1 for the connection to the origin server, which may be thousands of miles away.
In other words, in your test, depending on the client location and the origin server location.. your test may have used http 1.1 for the majority of the distance.
If you guys want to rerun this test on our network, we use http2 everywhere... your test would look like this on our network:
client <--http2--> edge node (closest to client) <--http2--> edge node (closest to server) <--http2--> origin server.
So even if your origin server doesn't support http2, it'll only use http 1.1 over the short hop between your server and the closest edge node.
You're welcome to email me if you want to discuss details you don't want to post here.
Edit: I should also mention, that we use multiple http 2 connections between our edge nodes and between the edgenode and origin server... removing that bottleneck. So only the client <--> edge node is a single http 2 connection.
- xzyfer 10y agoTo the best of my knowledge you are correct about how CloudFlare works. For context this data was collected over the period about a month on real production pages with significant traffic. The edges were well and truely primed.
- rgbrenner 10y agoalthough 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 when you're doing side-by-side comparisons (like the speed index), you have to actually check the x-cache headers to verify that a cache miss hasn't occurred. Otherwise, you wouldn't actually know that a significant portion of traffic isn't being sent over http 1.1 (because of cache misses).
- brobinson 10y ago>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?
- mgw 10y agoAs recently mentioned by a CloudFlare employee in this post (https://news.ycombinator.com/item?id=11439582 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.
- angry-hacker 10y agoSo does it matter for Cloudflare or affects my site's performance if I use http2 in the backend while behind Cloudflare?
- rgbrenner 10y agoyou're not using http2 then, since it would never upgrade the connection to http2. So the connections to your backend are all http 1.1.
- imaginenore 10y agoBut origin hits are relatively rare, so it doesn't matter that much that it's not http2.