6 ms·
HTTP/1 remains the one with the highest bandwidth. No surprise here.
by mgaunard 3y ago
HTTP/1 remains the one with the highest bandwidth.
No surprise here.
- BitPirate 3y agoIt's a bit like drag racing. If all you care about is the performance of a single transfer that doesn't have to deal with packet loss etc, HTTP/1 will win.
- varjag 3y agoIt runs over TCP, you don't need to deal with packet loss.
- vlovich123 3y agoWhat they’re suggesting is that under packet loss conditions QUIC will outperform TCP due to head of line blocking (particularly when there are multiple assets to fetch). Both TCP and QUIC abstract away packet loss but they have different performance characteristics under those conditions.
- mgaunard 3y agoHTTP/1 doesn't have head of line blocking, only HTTP/2 does.
- dilyevsky 3y agoMost browsers only support very limited number of connections so it kinda does
- mgaunard 3y agoLimitations of certain implementations are irrelevant. The protocol does not have any such limitation.
- dilyevsky 3y agoTotally, after all it’s not like we live in a real world where these things matter
- mgaunard 3y agoGiven the alternative, switching to a new protocol, requires much more code changes than fixing bad implements of the old protocol, your argument falls quite flat.
- vlovich123 3y agoThere are very real reasons why increasing the number of connections isn’t a thing and that has to do with the expense of creating and managing a connection server side. In fact switching to HTTP/2 was the largest speed up because you could fetch multiple resources at once. The problem of course is that multiplexing resources over a single TCP connection has head of line problems. Could this have been solved a different way? Perhaps but QUIC is tackling a number of TCP limitations at once (eg protocol ossification due to middleware).
- mgaunard 3y agoServer-side there is no difference between a different context per TCP connection for a HTTP1 server and a different context per HTTP2 stream within a HTTP2 server. If anything the HTTP2 requires more state due to the nesting nature of the contexts.
- vlovich123 3y agoThere 100% is. You’re thinking about user space context. But establishing a new socket in the kernel requires a fair amount of under the covers book keeping and the total number of file descriptors keeping those resources alive is a real problem for very popular web services that have to handle lots of concurrent simultaneous connections. At the application layer it’s less of an issue. HTTP/2 is indeed more complex to maintain in the application layer but that’s less to do with the memory implications of multiplexing requests /responses over a single TCP connection.
- acdha 3y agoThe only way the first part of your sentence is correct means that the second part is wrong. HTTP 1 pipelining suffers from head of line blocking just as badly (arguably worse) and the only workaround was opening multiple connections which HTTP/2 also supports.
- vlovich123 3y agoHTTP/1 has parallelism limitations due to number of simultaneous connections (both in terms of browser and server). HTTP/2 lets you retrieve multiple resources over the same connection improving parallelism but has head of line problems when it does so. HTTP/3 based on Quic solves parallelism and head of line blocking.
- vbezhenar 3y agoYesterday I was trying to track weird bug. I moved a website to Kubernetes and its performance was absolutely terrible. It was loading for 3 seconds on old infra and now it spends consistently 12 seconds loading. Google Chrome shows that 6 requests require 2-3 seconds to complete simultaneously. 3 of those requests are tiny static files served by nginx, 3 of those requests are very simple DB queries. Each request completes in few milliseconds using curl, but few seconds in Google Chrome. Long story short: I wasn't able to track down true source of this obviously wrong behaviour. But I switched ingress-nginx to disable HTTP 2 and with HTTP 1.1 it worked as expected, instantly serving all requests. I don't know if it's Google Chrome bug or if it's nginx bug. But I learned my lesson: HTTP 1.1 is good enough and higher versions are not stable yet. HTTP 3 is not even supported in ingress-nginx.
- xyzzy_plugh 3y agonginx is notoriously bad at not-HTTP 1.1. I wouldn't even bother trying. Envoy is significantly better in this department.
- doublepg23 3y agoHuh TIL. I had always considered nginx the “fast” http server.
- dilyevsky 3y agoNginx is fast enough for most applications. I wouldn’t bother switching if you dont need the power of “software defined” proxy
- xyzzy_plugh 3y agoPerformance aside, if you need fully functional HTTP/2 and maybe HTTP/3 support then you're better off not using nginx. It's a pain.
- apitman 3y agoWhat were your reasons for moving the site to kubernetes?
- 1vuio0pswjnm7 3y agoIt comes from a time before websites sucked because they are overloaded with ads ads and tracking. For non-interactively retrieving a single page of HTML, or some other resource, such as a video, or retrieving 100 pages, or 100 videos, in a single TCP connection, without any ads or tracking, HTTP/3 is overkill. It's more complex and it's slower than HTTP/1.0 and HTTP/1.1.
- sylware 3y agoI have a domestic web server, I did implement its code, and the most important was HTTP1.[01] to be very simple to implement, that to lower the cost of implementing my real-life HTTP1.[01] alternative (we all know Big Tech does not like that...). The best would be to have something like SMTP: the core is extremely simple and yet real-life-works everywhere, and via announced options/extensions it can _optionnaly_ grow in complexity.
- drowsspa 3y agoHonestly, one would think that the switch to a binary protocol and then to a different transport layer protocol would be justified by massive gains in performance...
- vlovich123 3y agoThe website being tested probably isn’t complicated enough to demonstrate that difference.
- drowsspa 3y agoEven then, I remember the sales pitches all mentioning performance improvements in the order of about 10-20%
- vlovich123 3y agoIn real world conditions, not loop back synthetic benchmarks.
- lttlrck 3y agoI believe his point is 10-20% gain is not massive. FWIW I don't know if that is what was claimed.
- vlovich123 3y ago20% is what real world data from Google suggested: https://www.zdnet.com/article/google-speeds-up-the-web-with-spdy/ https://www.zdnet.com/article/google-speeds-up-the-web-with-... I interpreted his comment as saying “where’s the 20% speed up” which seems like a more reasonable interpretation in context. A 20% speed up is actually quite substantial because that’s aggregate - it must mean there’s situations where it’s more as well as situations where it’s unchanged or worse (although unlikely to be worse under internet conditions).
- kiitos 3y ago
- frankjr 3y agoIt's a mystery, it's almost as if people have spent decades optimizing it.
- mgaunard 3y agoOr rather, it was simply designed correctly.
- k8svet 3y agoI know you think you're coming off smarter than everyone else, but it's not how it's landing. Turns out things are not that overly reductive to that extent at all in the real world
- mgaunard 3y agoNot everyone else, just Google and other HTTP/2 apologists.
- nolok 3y agoI'm not sure what you mean by "apologist" or what you're trying to say, I'm not the person you're answering to, and I have no dog in this fight. But you're talking in a very affirmative manner and apparently trying to say that one is "correct" and the other is not, while absolutely ignoring context and usage. I recommend you either run yourself, or find on the web, a benchmark about not a single HTTP request, but an actual web page, requesting the html, the css, the js, and the images. Don't even need to go modern web, even any old pre 2010 design with no font or anything else fancy will do. You will see that HTTP 1 and 1.1 are way, way worse at it that HTTP 2. Which is why HTTP 2 was created, and why it should be used. Also the sad joke that was domain rolling to trick simultaneous request per host configurations. Overall, your point of view doesn't make sense because this is not a winner takes all game. Plenty of server should and do also run HTTP 1 for their usage, notably file servers and the likes. The question to ask is "how many request in parallel do the user need, and how important that they all finish as close to each other as possible instead of one after the other". Similarily, HTTP3 is mostly about latency.
- foofie 3y ago> HTTP/1 remains the one with the highest bandwidth. To be fair, HTTP/2 and HTTP/3 weren't exactly aimed at maximizing bandwidth. They were focused on mitigating the performance constraints of having to spawn dozens of connections to perform the dozens of requests required to open a single webpage.
- eptcyka 3y agoHTTP3 also wants to minimize latency in bad network environments, not just mitigating the issue of too many requests.
- Beldin 3y agoToo bad that the alternative option - not requiring dozens of requests just for initial rendering of a single page - didn't catch on.
- foofie 3y agoI don't think it's realistic to expect a page load to not make a bunch of requests, considering that you will always have to support use cases involving downloading many small images. Either you handle that by expecting your servers to open a dedicated connection for each download request, or you take steps for that not to be an issue. Even if you presume horizontal scaling could mitigate that problem from the server side, you cannot sidestep the fact that you could simply reuse a single connection to get all your resources, or not require a connection at all.
- GuestHNUser 3y agoCouldn't agree more. So many performance problems could be mitigated if people wrote their client/server code to make as few requests as possible. Consider the case of requesting a webpage with hundreds of small images, one should embed all of the images into the single webpage! Requiring each image to be fetched in a different http request is ridiculous. It pains me to look at the network tab of modern websites.
- kiitos 3y agoAssuming SSL, HTTP/1 does not deliver better throughput than HTTP/2 in general. I'm not sure why you believe otherwise. Got any references?