9 ms·
The Long Road to HTTP/3
- exo762 6y agoPlease don't implement HTTP/2 and HTTP/3. Unless you are working on Firefox or some other thing that should compete with Chrome. Complicated protocol, unfriendly to hackers, offering huge corporation some millisecond savings to enforce their walled garden supremacy.
- londons_explore 6y ago> offering huge corporation some millisecond savings millisecond savings for all their users, which adds up to saving man-years every day. It is literally preventing people wasting lifetimes of effort looking at loading spinners. If you can do better, propose it, but don't force other people to waste lifetimes of effort otherwise.
- krzyk 6y agoHTTP 1.1 was good for long, long time. It had major benefits like pure text protocol, that one could use even by doing telnet to webserver (I did that when I needed to debug some pesky issues), starting with HTTP 2.0 it all goes to binary protocol (there is a text one, but almost no browser supports it :( ). And now, on top of that replace years of performance tuning TCP out of the window and use UDP, and invent TCP features on top of UDP. Yes, it is faster (few percent, this is not a 50% increase, it is a mere 3%), but the benefits will be reaped by the largest of corporations. Is it worth it? Maybe for end users (who will get their web page in 485 ms instead of 500ms), but for developers it is not. I was expecting HTTP 3.0 to get us huge benefits, but the numbers that were posted few days ago in hacker news are so underwhelming that I just don't care for it at all. And cost of development is high.
- kxrm 6y agoI am not sure I understand your concern, couldn't someone just develop a console app that can traverse the protocol? I am with you in the enjoyment of the simplicity of HTTP/1.1 but I don't agree that this particular concern is large enough to slow adoption.
- yc12340 6y agoIt is a complex, stateful (!!) protocol with non-trivial state-machine. A "console app" won't cut it. Even Wireshark might not cut it. Thanks to things like quick start, TLS session tickets and server push you won't understand what are you even looking on 90% of time. When HTTP 1.1 fails, your browser shows you a proper error message. When HTTP 2/3 fails, it is always "a protocol format violation". What violation? Why? Who knows. > I don't agree that this particular concern is large enough to slow adoption Sure thing. Kerberos is still alive and kicking. SMB 1 is built into every appliance. SOAP is the protocol of choice for corporations... Complexity never slows down adoption of <insert name of utter turd technology>, because such technology is generally being pushed down people's throats by someone else. If Google does not push HTTP 3 slower, it's adoption won't slow down. The quality of tech plays no role in that.
- kxrm 6y agoI disagree with the idea that this is being "pushed down people's throats". It's another protocol and nothing has been published stating that HTTP/1.1 support is going anywhere. A protocol format violation notice could tell you what was wrong it just hasn't been developed to the full extent to do so. Give browsers and tools time to develop and be built to properly debug the connection.
- onion2k 6y agoMaybe for end users (who will get their web page in 485 ms instead of 500ms), but for developers it is not. If the users see the benefit then the companies that the developers work for will find a new competitive advantage, which benefits the developers (higher profit, better job security, etc). It's impossible for one group to benefit without the other group also benefitting.
- M2Ys4U 6y ago>but the benefits will be reaped by the largest of corporations. What isn't? But you're also ignoring the fact that these benefits will also be reaped by end-users - and more by people who have poor connections to the Internet. >Is it worth it? Maybe for end users (who will get their web page in 485 ms instead of 500ms), but for developers it is not. The Internet is for End Users,[0] not for developers. UX >>> DX. [0] https://tools.ietf.org/html/rfc8890 https://tools.ietf.org/html/rfc8890
- krzyk 6y agoMy concern is that the benefit is minor, 3% faster web page download? And I wrote that big corporations, because those have millions of users, if users download faster then they can server even more users on smaller amount of hardware. 3% less hardware, that might be big if you are big. And considering it is developed by Google and pushed into Chrome they will get that benefit sooner than others.
- IfOnlyYouKnew 6y agoI, too, like to tell tacky tales of telnet tweaking. Some of them are even true. But to consider those rare instances to be equal or exceeding the value of a significant across-the-board performance increase is ridiculous. As are your attempts at populism: even against specific arguments how the benefits are more meaningful for smaller websites, you repeat the assertion that “the benefits will be reaped by the largest of corporations”. At least you have the decency to immediately contradict yourself.
- jeltz 6y agoNo, TCP has been bad for a long long time. TCP has never worked on dodgy internet connections. TCP often completely stalls on bad connections.
- otabdeveloper4 6y agoI can do better. Get rid of React and the other client-side libraries that reimplement the DOM interface in Javascript except slower and more brittle.
- steve_adams_86 6y agoFor what it’s worth, I’ve been profiling front end applications for over a decade, and the only time application bundle size was a real problem was very rare. On the other hand, people writing terrible code usually was the problem, and it would have happened with or without react. I think we’d see faster websites more often if developers had worse computers, or they invested more time in testing in resource constrained environments. I really don’t think react (or similar) is the core problem.
- RedShift1 6y agoThis, absolutely. Every developer should get like a Pentium 3 500 MHz and 512 MB of RAM to make their software work.
- otabdeveloper4 6y agoWho said anything about bundle size? There's already a "browser platform framework", it's standard, built into your browser and very fast. Trying to re-implement the browser inside the browser using Javascript is a recipe for disaster. (Indeed: witness the "modern" web.) I get that something more enterprisey-feeling with more knobs for programming in the large is more agreeable to the assembly-line programmer in large IT shops, but if you want your browser apps to act nice you'll have to suck it up and program natively without the overhead of a framework.
- coddle-hark 6y agoI don’t like this argument because it’s not like the extra milliseconds are going to make peoples lives more productive/happy/meaningful, even in aggregate. But if you are going to make this argument, one could also argue that it’s better to spend that time looking at loading spinners than looking at Facebook ads.
- Jonnax 6y agoHTTP 2 is faster though. Especially over mobile networks. Simple doesn't always mean better.
- p_l 6y agoNot just "simple" - broken, like all "bang it out on pseudo serial port" protocols of IETF nature. The text nature makes it easy to implement a broken client or server in a hobbled development environment, yes. It also creates a legacy of brammage that is impossible to fix without significant break in protocol like HTTP/2 is. Shortly speaking, Postel's Law Considered Harmful (in network protocols, at least)
- mrighele 6y ago> It also creates a legacy of brammage that is impossible to fix without significant break in protocol like HTTP/2 is. Isn't also HTTP/3 a significant break in protocol compared do HTTP/2 ?
- p_l 6y agoFrom what I remember on HTTP/3 vs HTTP/2,main differences are due to different transport layer - in fact yiu can even use QUIC without HTTP. The HTTP part are mostly lifted from HTTP/2
- jart 6y agoIETF protocols being YOLO is exactly what makes them so attractive. The web never would have been a thing if it needed to be built on something highly correct and ordered like Signalling System No. 7.
- p_l 6y agoSS7 is pretty bad comparison. OSI stack is better, but usually you'd build on top of higher-level components of it, not "supposedly text but honestly binary" protocol like HTTP. Being YOLO resulted in it taking over 15 years for email to not have random crashes involving my native language (and it's pretty simple, as it has no multibyte requirements). YOLO is how the internet has been broken through multi-level NAT, because ca 1980 someone convinced other that for "temporary test deployment" only 32bits will manage. YOLO is why transition to IPv6 takes ages even when higher level protocol wouldn't even notice, because ~1983 in panic someone made an emergency, student-made port of TOPS-20 TCP/IPv4 interface and we're left picking the pieces forever. And yes, HTTP and other "text" protocols are essentially binary protocols, because you end up dealing with whatever binary constant form someone put into client/server code. If someone goes too far into treating it as text when sending, suddenly you have a problem of dealing with missing record terminators. Standard header names could be just as well binary, except there's extra variation both possible (if you want to follow Postel's law), and spec (details of encoding).
- secondcoming 6y ago> unfriendly to hackers I think this is quite an important point. If the protocol is so complex such that creating custom implementations is prohibitive then that's an issue, and also perhaps a 'smell'
- p_l 6y agoIt's easier to create correct HTTP/2 implementation than HTTP 0.9/1.0/1.1 I had enough weekends wrecked by someone thinking they can implement HTTP themselves, only to find out that no, they couldn't, and that was for cases that didn't even hit corners. A netcat "HTTP server" demo is cute, but the power of the computer is that we make tools to make tools that can cover things like HTTP/2 reasonably fast - and much more correct.
- jart 6y agoCould you go more in depth? What project do you work on? What sort of interop issues have you encountered?
- saurik 6y agoFWIW, I have encountered tons of issues in peoples' "this is easy, right?" implementations of 100 Continue (including in some at-the-time major Ruby HTTP servers), non-ASCII encoding in HTTP headers (which has a ton of subtle rules, and just throwing around UTF-8 is not correct), and chunked Transfer-Encoding (though I can't remember what was wrong); further, people often don't even realize HTTP trailers exist at all, which is a bit infuriating :/. (Note, though, that I am still 100% on the side of the anti-HTTP/2 camp in this thread.) The core problem is that somehow people think they can implement a spec without even, you know, reading the spec, which is so far past hubris as to have gone through incompetence into obvious negligence.
- p_l 6y agoUsually the whole 3xx series of return codes, also any 2xx that isn't 200 and 204. If I find someone's "quick and dirty HTTP client library", I generally lose hope that redirects are handled. Anything more complex than that (and there's a lot!) is pipe dream.
- pa7x1 6y agoI think both protocol upgrades are misunderstood: HTTP/2 Besides the performance improvements brought in HTTP/2 via compression of headers and ability to multiplex streams it also enables full-duplex communication (à la WebSockets) [1]. This is used for example in gRPC, making the protocol far more versatile than given credit. [1] No, I'm not talking about Server Push. HTTP/3 HTTP/3 should bring benefits in wireless connections where TCP disconnections are frequent. QUIC handles connection identification so frequent TCP disconnects or even changing IPs would impact much less an HTTP/3 connection. I don't have the benchmarks but I would expect HTTP/3 to shine in this scenario which is bound to be more and more relevant with mobile devices, 5G, etc... In ideal, wired network, conditions HTTP/3 is probably not going to bring any improvement maybe even worse performance considering how much effort must have gone to optimizing TCP. For me, both upgrades have a raison d'être but that doesn't mean that they displace HTTP/1.1 of all use cases. If you don't care about the performance improvements or need full-duplex no need to use HTTP/2, if you are not targeting mobile networks no need for HTTP/3. Luckily protocol negotiation should be quite seamless.
- erinnh 6y agoAs a general question: why I do have to configure any nginx server that I want to use websockets on to specifically use http 1.1 if 2.0 also has support for them?
- chrismorgan 6y agoWebSockets was defined in a way that was incompatible with HTTP/2. RFC 8441 defines a way of reconciling the two, and explains the nature of the problem in its introduction: https://tools.ietf.org/html/rfc8441#section-1 https://tools.ietf.org/html/rfc8441#section-1. But I don’t believe any browsers has landed support for this yet. (In Chrome it’s been behind a flag for 2½ years with apparently no changes for the last two years. No idea what the hold-up is. https://www.chromestatus.com/feature/6251293127475200 https://www.chromestatus.com/feature/6251293127475200.)
- pa7x1 6y agoTo add a bit more information to what the sibling post provides. The original WebSocket handshake is done over HTTP/1.1, there is an RFC specifying how to perform the negotiation also over HTTP/2 connection but its support lacking. On top of that, HTTP/2 itself can do full-duplex communication so it can be used as a replacement of WebSocket, no negotiation or protocol upgrade involved. This capability is rarely used though but is, for example, leveraged by gRPC which is able to do bidirectional streaming [1]. [1] https://grpc.io/docs/what-is-grpc/core-concepts/ https://grpc.io/docs/what-is-grpc/core-concepts/
- dinomad 6y agoYou would rarely implement HTTP/1.x yourself. You could, but there are dedicated libraries for that.
- inopinatus 6y agoI still find myself connecting with a line-buffered client to GET / and so on, from time to time. Even in 2020 it's still the handiest way to diagnose some issues. I've always appreciated that most IETF protocols are text-oriented with line-buffered commands, and the option to speak the protocol directly in this fashion contributed enormously to my own understanding of SMTP, POP3, IMAP, IRC, NNTP, HTTP, FTP et al, and I always regretted not being to do the same with LDAP, SNMP, or BGP.
- dinomad 6y agoI can support the sentiment, but now when every public facing HTTP endpoint is TLS-protected... That ship has sailed. On internal networks HTTP/1 is not going anywhere any time soon, so there's that.
- inopinatus 6y agoFor TLS-wrapped protocols I'll use openssl s_client or ncat or some other simple stdin/out-friendly wrapper. There's no need to abandon line-oriented text-based application protocols just because the next layer down has a binary structure. After all, I'm not crafting TCP segments by hand. I recommend that internal network services use HTTPS, there's plenty of reason not to lower your standards internally.
- heipei 6y agoI actually view HTTP/2 as a great equalizing force for smaller players: It is perfect for "hiding" latency, so you are not forced to use a CDN like Cloudflare just to be closer to your user. Example: I run a service without a CDN, but I only host it on dedicated servers located in Europe. Per-request latency is OKish for users in the US, but my service makes dozens of subrequests to the same origin when loading pages (images, XHR calls). Without HTTP/2, the user-experience for US customers would be abysmal and I'd be forced to reach for a CDN which has a PoP closer to them.
- heipei 6y agohttps://http2.golang.org/gophertiles?latency=200 https://http2.golang.org/gophertiles?latency=200 and https://http1.golang.org/gophertiles?latency=200 https://http1.golang.org/gophertiles?latency=200 perfectly demonstrate the issue I'd be facing otherwise. 200ms latency from the US West Coast to Europe is realistic, and the number of subresources being requested is also realistic for my application. If you don't believe the latency, try services like these: https://cloudpingtest.com/digital_ocean https://cloudpingtest.com/digital_ocean and https://pingtestlive.com/digitalocean-ping https://pingtestlive.com/digitalocean-ping
- HugoDaniel 6y agoHttp 1.1 is still awesome. Even with all the incoming changes on front-end like js modules and all that, it feels a great fit that is also simple and reliable. Not only that but in a way http 1.1 makes http 2.0 look like the typical over-engineering approach to a non-existing problem, for the most part.
- Jonnax 6y agoThe problem doesn't exist for you. But plenty of people have high latency internet connections. Either due to technology (Mobile network, satellite) or due to them being very far from internet exchanges and the server's they want to connect to. Here is an example of the speed advantage on a low latency connection: https://youtu.be/QCEid2WCszM https://youtu.be/QCEid2WCszM Of course with my 1gbps broadband in a capital city both are pretty much instant when doing the test: https://imagekit.io/demo/http2-vs-http1 https://imagekit.io/demo/http2-vs-http1 But that's not the majority, it's not most cases. Especially if you leave a city and are on mobile internet with poor signal.
- littlecranky67 6y agoThat example seems to be arbitrarily constructed to benefit from parallel connections and does not reflect typical HTTP transfer payloads. In reality, Google mostly failed to show scientific proof that HTTP/2.0 provides beneficial on typical connections - one major reasoning why even introducing QUIC in HTTP/3. A lot of "amateur benchmarks" float the net claiming HTTP/2 speed superiority, but often the measurements are flawed (not taking TCP peculiarity like congestion control into account or even including it in the analysis; classic fault is failure to disable TCP initcwnd caching or flushing the cache when doing benchmarks).
- heipei 6y agoAnecdotal, but I've encountered so many legacy HTTP/1 applications on typical corporate VPN networks where the latency was horrible (due to the VPN and also due to the backend responses adding even more latency). What I've done in some cases is just thrown an HTTP/2 proxy in front of these and saw an immediate and very user-perceptible performance improvement for the user. So much so that people kept asking why using the proxied version I stood up was so much faster than going directly to the origin server.
- kzrdude 6y ago> While HTTP/3 specification is still in the draft stage, the latest version of the Chrome browser already supports it by default This is awful, because it means the spec review process does not have the impact that it can have, and Chrome gets to single-handedly define what they want the spec to be
- oefrha 6y agoThat's simply false. Chrome introduced QUIC long before the standardization process, did IETF just take it wholesale? No. Look up "ietf quic vs google quic". Same here.
- heipei 6y agoCorrect. Furthermore, the motto of the IETF is "Rough consensus and running code". Someone needs to go ahead and implement specs while they're still in draft stage so people can actually use it, benchmark it and in some cases figure out problems that no committee of IETF engineers would have been able to predict.
- coddle-hark 6y agoWell, these kinds of technologies need to be tested at scale before being adopted. On the other hand, SPDY (HTTP/2) was given the same treatment and instead of fixing its issues / scrapping it entirely, we ended up with HTTP/3 a few years later.
- dinomad 6y agoSPDY was very similar but incompatible with HTTP/2, scrapping it for a better option was a good move, IMO (HTTP/2 is still alive and well in Chrome).
- tambre 6y agoChrome has supported draft versions for the past few years already. The current spec is considered to be basically final and there are no more expected backwards compatibility breaks. Seems useful to get some widespread real-world experience in case there is actually something unexpected at a large scale.
- indeyets 6y agoAfter reading title I hoped for some insights on changes in HTTP/3-spec which delay finalization. Alas
- tannhaeuser 6y agoIt rubs me the wrong way how HTTP/3 is portrayed as a community engineering effort in a naive march of progress narrative when the reality is that it's only pushed by Google, making browser development even more of a pain. Also, server-side implementations are missing last I checked, so it'll only be available for the Google and maybe Cloudflare fake web a la AMP. HailCorporate!
- throwaway189262 6y agoI wish Google would stop pushing HTTP/3 . HTTP/2 really is good enough. Clouldflare did a recent test where HTTP/3 was, at most, 4% faster. And sometimes it was slower. And I've seen other benchmarks with the same results. The only big advantage UDP based HTTP/3 provides over HTTP/2 is error correction without head of line blocking. And most connections including cellular already do error correction below layer 7 so it's mostly pointless. https://blog.cloudflare.com/http-3-vs-http-2/ https://blog.cloudflare.com/http-3-vs-http-2/
- pornel 6y agoI'm hoping DNS-over-HTTP will use HTTP/3 to be back on DNS. The error correction below layer 7 is a problem, because error in one stream blocks all streams, and lower levels of the stack can't help that.
- throwaway189262 6y agoOn the other hand, the error correction below layer 7 does does head of line blocking anyways. DSL is a good example, when "interleave" is on it adds ~40ms of latency to reassemble packets. Cellular is less severe but similar. Fixing head of line blocking at layer 7 won't un-interleave the packets.
- EricBurnett 6y ago(Disclaimer: Googler on build tools). I hear this argument a lot, and fail to be convinced. Optimizations at scale matter a lot. Let's posit that 100,000 developer-years have been spent implementing HTTP/2 and tools to interact with it. (Hopefully a great over-estimate). Let's say we have to spend all that again to move to HTTP/3. Is it worth it? Well, per random internet stats I haven't validated, there are about 4b internet users, spending about 3h per day on the internet apiece. I could imagine 5% of that is spent on synchronous resource loading. That's about 10m/day/user - or about 28M years/year spent waiting on resources to load. A 1% savings (the minimum of CloudFlare's range) is 280k human years / year. And that's the bottom end - could be as high as 4% (1.1M years/ year), and without BBR (negatively impacting high packet loss and high throughput connections in particular). Is "persons average time on the internet" comparable to "paid developer time"? No. A lot of that user time is timeboxed "wasted" time, in the endless content scroll. With that in mind, is it worth it overall? Probably. I've tried to estimate in favor of developers, but I still get their one-time effort paid back 2.8-11x _each year_ in user time, under unfavorable conditions. And this is growing rapidly, both in user count and time per user. And that says nothing about the privacy benefits of encrypting headers and whatnot, which you should probably ascribe nonzero value.
- Mizza 6y agoI am still waiting of a thorough comparison between HTTP/3 and Aspera. Has anybody attempted this yet?
- silon42 6y agoIs there an outbound proxy for HTTP/3?
- rini17 6y agoNot a word about fairness/congestion control. What if throwing out decades of tuning congestion control is going to have consequences. Which, to put my tinfoil hat on, might lead to problems resolvable only by tiered traffic (and end of network neutrality).
- EricBurnett 6y ago(Disclaimer: Googler on build tools; Canadian) Tiered how? By IP? With most content served by a CDN or DDOS shield already, that's arguably fine; most meaningful on the customer IP where you'd want fairness across customers anyways. Or do you mean internet providers will privilege their own content? Already happening, to the extent allowed by law (I'm looking at you, FCC). Not likely to change with HTTP/3 - empirically, needs to be addressed by regulation and not technology.