8 ms·
HTTP/2 is here. Goodbye SPDY? Not quite yet
- ropiku 11y agoDoes anyone know if they support HTTP/2 on the backend side too ? They didn't with SPDY and I think it would help to multiplex connections all the way.
- jgrahamc 11y agoNot right now. We are currently experimenting with Server Push because we think it will help with the end user experience more than HTTP/2 to the origin server. You can see that running on the experimental server https://http2.cloudflare.com/ https://http2.cloudflare.com/ The question is... does HTTP/2 on the backend help that much. We aren't restricted like a browser in terms of bandwidth, latency or number of connections we can open. Greatest benefit for HTTP/2 is between browser and us, but origin HTTP/2 hasn't been forgotten.
- deleted 11y ago[deleted]
- alimbada 11y agoSurely HTTP/2 to the origin server will reduce latency between Cloudflare and the origin server and thus reduce overall latency to the browser?
- jgrahamc 11y agoYes, but you have to look at the mix of things being delivered to the client. For a typical CloudFlare customer you'll have some dynamic HTML delivered all the way from the origin and then a bunch of static assets delivered from our cache. HTTP/2 between us and the browser is very valuable there, less so on the origin connection.
- alimbada 11y agoI see. That's fair enough. Thanks.
- predakanga 11y agoI've love to see CloudFlare enable admins to utilize Server Push without extra configuration on their backend. My ideal situation is one where I can have my webapp specify it's dependencies through a spec such as Server Hints[1], and have them be requested and cached edge-side, turned into a Server Push to the end user. [1]: https://www.chromium.org/spdy/link-headers-and-server-hint/link-rel-subresource https://www.chromium.org/spdy/link-headers-and-server-hint/l...
- jgrahamc 11y agoStay tuned.
- manigandham 11y agoWouldn't HTTP/2 to origin give most of the benefits of Railgun, other than the change delta acceleration? Seems like for high traffic sites and APIs the persistent non-blocking multiplexed connections with binary transfer might make a big difference? I think Instart Logic uses the same kind of model in between their proxy nodes called IPTP (inter-proxy transport protocol).
- tgb 11y agoThose page load improvement numbers seem ridiculously good (factor of almost 2 versus HTTP 1.1). Are they really expecting that to hold up in real world cases?
- therealmarv 11y agoYou see nearly 90% of this improvements already for years with SPDY. SSL with HTTP 1.1 was really slow before Google, FB etc. starting using SPDY years ago. So comparing HTTP 1.1 with SSL to HTTP/2 with SSL seems legit for me.
- rplnt 11y agoI thought HTTP/2 was going to be SSL only? Or was that other protocol?
- therealmarv 11y agoSPDY only runs encrypted. The HTTP/2 specification allows it to run without encryption https://http2.github.io/faq/#does-http2-require-encryption https://http2.github.io/faq/#does-http2-require-encryption But most of the browser vendors will only allow to use it with encryption (see footnotes here): http://caniuse.com/#search=http%2F2 http://caniuse.com/#search=http%2F2
- magicalist 11y agoNote that the caniuse data is slightly wrong. All browsers only support HTTP/2 over TLS. (there's an issue to fix that on the caniuse github repo: https://github.com/Fyrd/caniuse/issues/2098 https://github.com/Fyrd/caniuse/issues/2098)
- contravariant 11y agoIn their demo[1] it is 20x faster for me, I had to disable http pipelining for it to work correctly (not sure why, but http/2 became a lot faster after I had disabled pipelining). Minor nitpick: I don't agree with the way they calculate the percentage, if it takes 5% of the time then it's 20x (i.e. 1900%) faster, not 95%. [1]: https://www.cloudflare.com/http2/ https://www.cloudflare.com/http2/
- NoGravitas 11y agoI'm quite surprised that there are a lot of browsers in the wild that support SPDY, but not HTTP/2, given auto-updating. But that's what their numbers show. Maybe mobile skews this?
- therealmarv 11y agoI think it has more to do with "old" IE11 version on Windows<10: See http://caniuse.com/#search=http%2F2 http://caniuse.com/#search=http%2F2 vs. http://caniuse.com/#search=spdy http://caniuse.com/#search=spdy A awful lot of companies still use IE and not Windows 10 ;)
- chriselsen 11y agoThe caniuse.com data on http/2 appears to have some flaws. Biggest buckets for browsers that support SPDY but not HTTP/2 for our website right now are: a) Chrome for mobile b) Safari on older Mac OS X versions c) Older Chrome for desktop versions d) Internet Explorer (small impact) Other websites might see different ratios depending on their audience. Stay tuned for instructions on how to gain protocol version insight for your own website on CF.
- therealmarv 11y agothanks for more insight statistics :)
- therealmarv 11y agoHmm, does anyone know how to support SPDY and HTTP/2 on a nginx>=1.9.5 and which has only module "ngx_http_v2_module" build inside? What is the configuration for nginx to support SPDY and HTTP/2 ?
- jgrahamc 11y agoWe developed our own patch to NGINX that allows it to support both SPDY/3.1 and HTTP/2 and to negotiate correctly. Stock NGINX allows you to have one or the other, but not both.
- therealmarv 11y agoWould be nice to see that patch open sourced (at least I can hope) ;) :)
- jgrahamc 11y agoI'm sure we will. We open source pretty much everything we can (i.e. we don't open source stuff that's too complex to extract from our business logic).
- chriselsen 11y agoStay tuned for that. Not all gifts at once. ;-)
- newman314 11y agoI believe it's either or but not both.
- deleted 11y ago[deleted]
- mei0Iesh 11y agoYou can't: "This patch replaces the SPDY module in NGINX." https://www.nginx.com/blog/http2-r7/ https://www.nginx.com/blog/http2-r7/ "Before installing the nginx‑plus‑http2 package, you must remove the spdy parameter on all listen directives in your configuration (replace it with the http2 and ssl parameters to enable support for HTTP/2). With this package, NGINX Plus fails to start if any listen directives have the spdy parameter. NGINX Plus R7 supports both SPDY and HTTP/2. In a future release we will deprecate support for SPDY. Google is deprecating SPDY in early 2016, making it unnecessary to support both protocols at that point."
- xpose2000 11y agoIn terms of optimal performance for end users... I should now be hosting all files on my own server w/ Cloudflare rather rather something like Google's CDN? For example, jQuery. Reason being, is that those files will all load in parallel on my own domain, whereas for another domain like Google, it'd have to renegotiate an SSL connection and wait a bit longer? Is this correct? Or is there more to it than that?
- ropiku 11y agoFor HTTP/2 it's a lot better to have fewer domains since they download in parallel as you say. I think the only advantage of hosting jQuery from a shared place would be caching between servers. CloudFlare already acts as a CDN for your static files.
- kaizendad 11y agoWouldn't caching be a big thing for libraries like jQuery? Its highly-likely that jQuery was used by one of the other most recent sites a user visited... why not still take advantage of the fact jQuery may be cached locally?
- tokenizerrr 11y agoBecause most browser caches are insanely small and really eager to evict stuff, especially on mobile phones.
- joshuacc 11y agoBut perhaps not as likely that one of those sites had exactly the same version of jQuery.
- buro9 11y agoYou are correct. What I'm now doing is reducing the number of third party domains I call. In essence, where I used to use cdnjs.cloudflare.com or whatever other externally hosted JS or CSS, I'm now mostly self-hosting, but still behind CloudFlare. You can see this in action on https://www.lfgss.com/ https://www.lfgss.com/ which is now serving everything it can locally... only fonts and Persona really remain external. I have been using preconnect hints to try and reduce the latency created by contacting those 3rd parties, but TBH the fact that I use SSL as much as possible meant that those connections take time to establish. In that time, most of the assets can be delivered over my already open connection. There is an argument that cdnjs/Google CDN or whatever is better for the web, but personally I'm unconvinced. I think one should self-host/control all of the JavaScript that runs on your own site, and that unless the exact versions of the exact libs are cached in end user browsers the benefits are not even there. This also looks to be a smarter thing to do anyway; the increasing prevalence of ad-blocking tech is impacting 3rd party hosted assets, and thus the experience of your users. You can mitigate that by self-hosting. I haven't obliterated first-party extra domains, for example I still use a different domain for uploaded assets by users. This is a security thing, if I could safely do it I'd serve everything I can from just the one domain. Basically: Self-host, http/2 has brought you the gift of speed to make that good again.
- mei0Iesh 11y agoI'm using HTTP/2. Here's some quick stats: # tail -n100000 access.log | grep 'jquery.js' | grep 'HTTP/1' | wc 3,095 # tail -n100000 access.log | grep 'jquery.js' | grep 'HTTP/2' | wc 6,074
- d0ugie 11y agoFor me, 505 and 1947 respectively. I guess my audience is hipper than yours. :)
- Cshelton 11y agoI really wish Microsoft gave HTTP/2 support to IE 11 on windows 8/8.1. Any insight as to why they decided not to support it on IE 11 for windows < 8.1 would be appreciated. Many of our users are stuck with windows 8/8.1, or even 7 for many more years unfortunately. Some of them won't even have another browser as an option(enterprise...).
- mattmanser 11y agoThey're not even updating IIS 8.5 to support HTTP/2 as far as anyone can tell, you'll have to update to windows server 2016 to get it.
- snuxoll 11y ago"Updating" IIS to support HTTP/2 means updating http.sys, something they are not keen on doing without a major OS upgrade.
- prdonahue 11y agoNor do they like updating schannel.dll (the underling SSL/TLS stack) unless there's an extremely serious vulnerability in it. And even then, they bungle it more often than not (http://www.infoworld.com/article/2848574/operating-systems/microsoft-botches-kb-2992611-schannel-patch-tls-alert-code-40-slow-sql-server-block-iis-sites.html http://www.infoworld.com/article/2848574/operating-systems/m...). The reason SChannel matters is that the protocol used to negotiate which "next generation" protocol is to be used for the HTTP connection (not session, minor point) is something called Application-Layer Protocol Negotiation. ALPN is a TLS extension sent as part of the ClientHello but wasn't added to SChannel until Windows 8.1/2012 R2 Server. (There was a predecessor to ALPN called NPN that Adam Langley authored/implemented for Chrome but Microsoft never implemented it.)
- prdonahue 11y agoSee my point below about ALPN. You need to advertise support for HTTP/2 in the TLS ClientHello and this logic is contained (on a Microsoft platform) in schannel.dll. Microsoft first added ALPN to SChannel in 8.1 and RARELY updates this library outside of OS releases, so that's (at least one reason) why you won't see on Windows 8/2012 Server.
- danielsamuels 11y agoIs it possible to use HTTP/2 without SSL yet? I tried it a few weeks ago and my browser was just downloading a 4KB file with some random bytes in it, I assume this was the server response but it wasn't clear.
- Skunkleton 11y agoPer the spec SSL is not required, however all major browser implementations require TLS to negotiate using HTTP/2.
- danielsamuels 11y agoSo in theory it's not required but in practice it is? And to think it used to be IE which didn't follow specs.
- Dylan16807 11y agoThe browsers follow the spec fine. The requirement for SSL was almost in the spec, and support for non-SSL is optional for a reason. Pushing people onto SSL is good.
- paulddraper 11y agoII just like pushing people around in general.
- karaziox 11y agoWell, the specification defines two negociation procedures. You are not forced to support both, you are not even forced to support one, but then how would you make use of it? And you are also free to negociate it another way should you decide to. The spec defines the protocol, not the transport on which it is used or the way the underlying communication is established. They could have put the two negociation methods in another RFC for what it's worth, since they don't affect the inner workings of the protocol itself.
- 11y ago
- ape4 11y agoBoth? Yuck.
- tracker1 11y agoAm I correct in assuming this means that cloudflare reads html to determine other files that need to be sent (css, js, images)?
- Viper007Bond 11y agoPush isn't supported so it's all on the browser to request the needed files.
- jgrahamc 11y agoYet
- lawl 11y agoAn idea I heard (not cf related) was to analyze referers of past requests to be able to determine what resources a user most likely needs. They'll probably implement something like this sometime in the future, if they do it.
- adamowen 11y agoFor comparison, I enabled HTTP/2 via CloudFlare on a dev site. Results: http://blog.adamowen.co.uk/deploying-http2-using-cloudflare-initial-results/ http://blog.adamowen.co.uk/deploying-http2-using-cloudflare-...
- joeblau 11y agoJust tested my side project https://www.gitignore.io https://www.gitignore.io and it now has sub second loading time. Unfortunately, adding Google analytics doubles the loading time to about 1.8 seconds.
- treyp 11y agoat least google analytics is non blocking
- raullen 11y agoGoogle's HTTP loadbanlancer and CDN have supported H2 for a long while.
- xyproto 11y agoHere's a small utility for checking if a web server offers HTTP/2: https://github.com/xyproto/http2check https://github.com/xyproto/http2check