HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
11–20 of 62 posts
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#12One important difference: HTTP/2 requires* encryption. This makes getting up and running for local development and small deployments more difficult. * https://http2.github.io/faq/#does-http2-require-encryption "[...] currently no browser supports HTTP/2 unencrypted."
Accepting and indicating self signed would also be handy in Tor's onion sites, since the only companies that will issue certs require EV2 and all your info and a pile of money. And Onioncerts are pretty much only Facebook's area :/
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#13Aha, this article is by the creator of Quart[0]! I'm a big fan - one of my favorite new python packages. It's essentially a super zippy, flask-compatible asyncio python server. I switched a flask app over recently and saw an immediate 10-20x throughput gain (the app is entirely io-bound). pgjones was a pleasure to work with when I had a few issues and had to contribute a few compat fixes as well. Thanks for the aweso…
Wow, any chance you could write up the throughput gain? It would be great to see some real production numbers. Thanks for the comments.
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#14pathetic that you only make people pay attention using clickbaity and angry titles
I think my articles in the past have been too dull; I think people would like to read something interesting and entertaining so I'm trying to improve in this regard. Was the article a good read or did the title put you off?
I loathe the tendency to pack emotion and opinion into everything, and exaggerate everything, just because people think they'll get readers that way. Please don't.
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#15HTTP/2 spec says it should not share a connection across a host/port combo, any content you have loaded on a CDN, or a your own cdn.mydomain.com will be a separate connection. The reason CDNs are faster is because they are closer(lower latency) or it is common and already cached in your browser.
HTTP/2 still suffers from latency and TCP Window sizes, so no your 8mb website will still be slow after you enable HTTP/2, you still have to push 8mb out to the client. If you have a site loading over 80 resources, concat and minify that first before asking your server admin to turn on HTTP/2.
HTTP/1 clients gets around some network latency issues by issuing more than one TCP socket, just like SFTP clients using more than one thread. Because it is hard to overload a single socket when your latency for your ACK packets is 200ms+. If this wasn't true, Google would not be spending the time on a UDP based version of HTTP. HTTP/2
Overall, lower you content size, lower the number of requests it takes to load your initial website, THEN turn on HTTP/2.
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#16Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#17Yes and no, because it is complicated. This is a fairly naive example of HTTP/2 to illustrate a point, while most websites I am called in on to optimize the load time are not built like this. This example only shaved off around 60ms for 20 requests, if your website has 20 requests to load, you have ads or you have a resource problem. HTTP/2 spec says it should not share a connection across a host/port combo, any cont…
I haven't seen more recent studies on this, but I do remember a lot of use cases and benchmarks I read where if your user base was on high-latency or unreliable internet connections (packet loss, even minor), HTTP/2 would be slower than 1. Here is a good summary of the issue:
https://www.twilio.com/blog/2017/10/http2-issues.html
Like you mentioned, HTTP is slowly moving towards UDP instead of TCP (QUIC protocol) to combat this.
Cloudflare covers it a bit here too: https://blog.cloudflare.com/the-road-to-quic/
I'm a fan of HTTP/2, and I think most people will benefit, but I really hate these kind of posts that only highlight the best case scenario to prove a point that has wide-ranging consequences. I can go on google and type "HTTP/2 is fast" and be reaffirmed in everything I thought about HTTP/2 -- I just did -- and almost every single blog mentioned zero downsides to using HTTP/2.
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#18pathetic that you only make people pay attention using clickbaity and angry titles
I think my articles in the past have been too dull; I think people would like to read something interesting and entertaining so I'm trying to improve in this regard. Was the article a good read or did the title put you off?
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#19Yes and no, because it is complicated. This is a fairly naive example of HTTP/2 to illustrate a point, while most websites I am called in on to optimize the load time are not built like this. This example only shaved off around 60ms for 20 requests, if your website has 20 requests to load, you have ads or you have a resource problem. HTTP/2 spec says it should not share a connection across a host/port combo, any cont…
> The reason CDNs are faster is because they are closer(lower latency) or it is common and already cached in your browser.
Shared CDN hit rates tend to be rather low and usually slower than self-hosting unless you're requesting a LOT of resources because the DNS + TLS setup overhead are greater than the eventual savings. Opening multiple connections was useful back when you had very low limits for the number of simultaneous requests but the browsers all raised that and HTTP/2 allowing interleaved requests really tilted that into net-loss territory.
The best way to do this is to host your site behind a CDN so that initial setup cost is amortized across almost every request and you can use things like pushes for the most critical page resources.
> If you have a site loading over 80 resources, concat and minify that first before asking your server admin to turn on HTTP/2.
Similarly, this is frequently a performance de-optimization because it means that none of your resources will be processed until the entire bundle finishes streaming and the client needs to refetch the entire thing any time a single byte changes. The right way to do this is to bundle only things which change together, prioritize the ones which block rendering, and break as much as possible out into asynchronous loads so you don't need to transfer most of it before the site is functional.
Re: HTTP/1 should die; HTTP/2 can do everything HTTP/1 could, only faster
#20One important difference: HTTP/2 requires* encryption. This makes getting up and running for local development and small deployments more difficult. * https://http2.github.io/faq/#does-http2-require-encryption "[...] currently no browser supports HTTP/2 unencrypted."
I'm guessing they're not carving out a niche for self-signed certs? I think that would have been a fair balance, of setting a "this is a self-signed cert" instead of the current "YoUr WeBsIte IS UNSECURED" (which isn't actually true). Accepting and indicating self signed would also be handy in Tor's onion sites, since the only companies that will issue certs require EV2 and all your info and a pile of money. And Onio…
how would I discern your self-signed certificate from the one served by the person arp-spoofing the gateway in a Starbucks?