TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Blink: Intent to Remove: HTTP/2 and gQUIC server push

175 pointsby aciswhatover 4 years ago

19 comments

dsignover 4 years ago
Five years ago, we built a company around HTTP&#x2F;2 server push. Here is what we learned:<p>- The interaction of HTTP&#x2F;2 push with browser caches were left unspecified for the most part, and browsers implemented different ad-hoc policies.<p>- Safari in particular was pretty bad.<p>- Since HTTP&#x2F;2 Push worked at a different layer than the rest of a web application, our offering centered around reverse-engineering traffic patterns, with the help of statistics and machine learning. We would find the resources which were more often not cached, and push those.<p>- HTTP&#x2F;2 Push, when well implemented, offered reductions in time to DOMContentLoaded in the order of 5 to 30%. However, web traffic is noisy and visitors fall in many different buckets by network connection type and latency. Finding that 5% to 30% performance gain required looking to those buckets. And, DOMContentLoaded doesn&#x27;t include image loading, and those dominated the overall page loading time.<p>- As the size of, say, Javascript increases, the gains from using HTTP&#x2F;2 Push asymptotically tend to zero.<p>- The PUSH_PROMISE packets did indeed could increase loading time because they needed to be sent when the TCP connection was still cold. At that point in time, each byte costs more latency-wise.<p>- If a pushed resource was not matched or not needed, the loaded time increased again.<p>Being a tiny company, we eventually moved on and found other ways of decreasing loading times that were easier for us to implement and maintain and also easier to explain to our customers.
评论 #25069762 未加载
评论 #25071127 未加载
jaffathecakeover 4 years ago
I think this is the right decision. I looked at HTTP&#x2F;2 push in 2017 and the design is very confusing, and the implementations are pretty bad. <a href="https:&#x2F;&#x2F;jakearchibald.com&#x2F;2017&#x2F;h2-push-tougher-than-i-thought&#x2F;" rel="nofollow">https:&#x2F;&#x2F;jakearchibald.com&#x2F;2017&#x2F;h2-push-tougher-than-i-though...</a>.<p>Chrome&#x27;s implementation was best, but the design of HTTP&#x2F;2 push makes it really hard to do the right thing. Not just when it comes to pushing resources unnecessarily, but also delaying the delivery of higher priority resources.<p>&lt;link rel=&quot;preload&quot;&gt; is much simpler to understand and use, and can be optimised by the browser.<p>Disclaimer: I work on the Chrome team, but I&#x27;m not on the networking team, and wasn&#x27;t involved in this decision.
评论 #25067613 未加载
评论 #25067320 未加载
评论 #25067443 未加载
评论 #25071130 未加载
评论 #25069273 未加载
xyzzy_plughover 4 years ago
This is pretty funny. After all the fuss, turns out that server push isn&#x27;t really useful. I&#x27;m half impressed that they are able to actually admit they were wrong (implicitly of course) by removing it. I can&#x27;t say I&#x27;m surprised, either. I could never think of a reasonable use case for it.<p>With the variety of streaming options available now, it really seems antiquated.
评论 #25065189 未加载
评论 #25067429 未加载
评论 #25065254 未加载
评论 #25065569 未加载
xeeeeeeeeeeenuover 4 years ago
Sadly, HTTP 103 hints, which provide a much saner way to preload content, are still unimplemented in all major browsers.
评论 #25065655 未加载
评论 #25065916 未加载
评论 #25065512 未加载
simscitizenover 4 years ago
Server push never made any sense anyway for most subresources. The server doesn&#x27;t know about the state of the browser&#x27;s cache, so using server push for a subresource could cause it to needlessly push a subresource that was already cached by the browser.<p>Maybe it is useful outside of the browser context, e.g. in gRPC.
评论 #25065390 未加载
评论 #25065767 未加载
yc12340over 4 years ago
HTTP&#x2F;2 server push is odd. When you can get the most benefit out of it, you usually don&#x27;t care, because your resources are small and load quickly anyway. And when you care (because your resources are big don&#x27;t load quickly enough), HTTP push actually hurts you, because you are pushing the same big resource on every page load.<p>I have tried to use it once, and the hassle of distinguishing between first time visits and repeated visits is simply not worth it. Even the hassle of using &lt;link rel=&quot;preload&quot;&gt; is usually not worth it in large apps — if you have time for that, it can be better spent on reducing size of assets.
评论 #25067622 未加载
评论 #25067136 未加载
randomtreeover 4 years ago
HTTP&#x2F;2 Push allows to _really_ optimize first page load, giving a wow effect. (Especially when you can use a single server w&#x2F;o geodns to serve the whole world with a really low latency!)<p>I use it on my pet project website, and it allows for a remarkable first page load time.<p>And I don&#x27;t have to make all these old-school tricks, like inlining CSS &amp; JS.<p>HTTP&#x2F;2 Push allows for such a pleasant website development. You can have hundreds of images on the page, and normally, you&#x27;d be latency-bound to load it in a reasonable amount of time. And the way to solve it old-school is to merge them all into a one big image, and use CSS to use parts of the image instead of separate image URLs. This is an ugly solution for a latency problem. Push is so much better!<p>The fact that 99% of people are too lazy to learn a new trick shouldn&#x27;t really hamstring people into using 30-year old tricks to get to a decent latency!
评论 #25069482 未加载
评论 #25068841 未加载
评论 #25069849 未加载
est31over 4 years ago
They quote a study by Akamai, a CDN company. Of course, if you run a CDN then you don&#x27;t like products that help reduce latency when you don&#x27;t have a CDN...<p>Server push is most useful in cases where latency is high, i.e. server and client are at different ends of the globe. It helps reduce round trips needed to load a website. Any good CDN has nodes at most important locations so the latency to the server will be low. Thus server push won&#x27;t be as helpful.
评论 #25067161 未加载
FeepingCreatureover 4 years ago
Why doesn&#x27;t the client keep a bloom filter of already-requested URLs on that website and send it along to the server on the first request? That way, you&#x27;d get the less-space benefit of link rel, but the latency benefit of push.<p>Also, this is very Google: &quot;Well, few people have adopted it over five years, time to remove it.&quot; HTTPS is almost as old as HTTP and is only now starting to become universal. Google has no patience, seriously.
评论 #25067768 未加载
评论 #25067587 未加载
kdunglasover 4 years ago
Server Push has a use case for web APIs. I just published a benchmark showing that under certain conditions APIs using Server Push (such as APIs implementing the <a href="https:&#x2F;&#x2F;vulcain.rocks" rel="nofollow">https:&#x2F;&#x2F;vulcain.rocks</a> specification) can be 4x times faster than APIs generating compound documents (GraphQL-like): <a href="https:&#x2F;&#x2F;github.com&#x2F;dunglas&#x2F;api-parallelism-benchmark" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dunglas&#x2F;api-parallelism-benchmark</a><p>They key point for performance is to send relations in parallel in separate HTTP streams. Even without Server Push Vulcain-like APIs are still faster than APIs relying on compound documents thanks to Preload links and to HTTP&#x2F;2 &#x2F; HTTP&#x2F;3 multiplexing.<p>Using Preload links also fixes the over-pushing problem (pushing a relation already in a server-side or client-side cache), some limitations regarding authorization (by default most servers don&#x27;t propagate the Authorization HTTP header nor cookies in the push request), and and is easier to implement.<p>(By the way Preload links were supported from day 1 by the Vulcain Gateway Server.)<p>However, using Preload links introduce a bit more latency than using Server Push. Does the theoretical performance gain is worth the added complexity? To be honest I don&#x27;t know. I guess it doesn&#x27;t.<p>Using Preload links combined with Early Hints (the 103 status code - RFC 8297) may totally remove the need for Server Push. And Early Hints are way easier than Server Push to implement (it&#x27;s even possible in PHP!).<p>Unfortunately browsers don&#x27;t support Early Hints yet.<p>- Chrome bug: <a href="https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=671310" rel="nofollow">https:&#x2F;&#x2F;bugs.chromium.org&#x2F;p&#x2F;chromium&#x2F;issues&#x2F;detail?id=671310</a><p>- Firefox bug: <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1407355" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1407355</a><p>For the API use case, it would be nice that Blink adds support of Early Hints before killing Server Push!
评论 #25070257 未加载
colinclerkover 4 years ago
I&#x27;m surprised about the timing.<p>The serverless&#x2F;edge technologies becoming available at CDNs are making it easy to imagine &quot;automatic push&quot; could come soon.<p>Any chance there are folks from Vercel or Netlify here and can shed light on why push hasn&#x27;t been implemented in their platforms (or if it has)? At first glance, it seems like Next.js in particular (server rendering) is ripe for automatic push.
评论 #25065925 未加载
rektideover 4 years ago
To me, the jury is very much still out on push. It&#x27;s entirely in-determinate how useful it is, because only a handful of people have stepped up to try. There is a lot of trickery to getting the server to determine what resources to push, that it knows the client needs, but basics like &quot;let&#x27;s look at the main pages etag to figure it out&quot; got very little experimentation &amp; tries, certainly very few documented.<p>&gt; Chrome currently supports handling push streams over HTTP&#x2F;2 and gQUIC, and this intent is about removing support over both protocols. Chrome does not support push over HTTP&#x2F;3 and adding support is not on the roadmap.<p>I am shocked &amp; terrified that google would consider not supporting a sizable chunk of HTTP in their user-agent. I understand that uptake has been slow. That this is not popular. But I do not see support as optional. This practice, of picking &amp; choosing what to implement of our core standards, of deciding to drop core features that were by concensus agreed upon- because 5 years have passed &amp; we&#x27;re not sure yet how to use it well yet- is something I bow my head to &amp; just hope, hope we can keep on through.
评论 #25066521 未加载
评论 #25065881 未加载
_bjhover 4 years ago
This is odd, since I thought Akamai was working on LL-HLS, and the spec recommends the use of HTTP&#x2F;2 server push for periodic playlist updates.
评论 #25066156 未加载
评论 #25065851 未加载
francislavoieover 4 years ago
Well that sucks. Caddy has supported HTTP&#x2F;2 push for a very long time (except for a few months after v2 was released since it was a total rewrite). <a href="https:&#x2F;&#x2F;caddyserver.com&#x2F;docs&#x2F;caddyfile&#x2F;directives&#x2F;push" rel="nofollow">https:&#x2F;&#x2F;caddyserver.com&#x2F;docs&#x2F;caddyfile&#x2F;directives&#x2F;push</a>
评论 #25067635 未加载
The_rationalistover 4 years ago
Do web-transport obscolete push? <a href="https:&#x2F;&#x2F;w3c.github.io&#x2F;webtransport&#x2F;" rel="nofollow">https:&#x2F;&#x2F;w3c.github.io&#x2F;webtransport&#x2F;</a><p>I had read a technical comment once that told that HTTP 2 push was superior to websocket but couldn&#x27;t remember why. Also what&#x27;s the difference between push and server sent events?
评论 #25065515 未加载
评论 #25065809 未加载
Town0over 4 years ago
What if on link hover, some javascript code notifies the server and the server pushes the page? When the user clicks the link the page will have already been downloaded. Would that not be possible and useful?
评论 #25065629 未加载
评论 #25069362 未加载
评论 #25066010 未加载
评论 #25065564 未加载
seanwilsonover 4 years ago
So instead of pursuing the idea of server pushing your CSS so the top of your page renders fast, the best option is to inline CSS directly into the page but lose caching benefits between pages?<p>Crafting a fast website is going to be messy and difficult for a good while still.
评论 #25065300 未加载
评论 #25066090 未加载
评论 #25065952 未加载
评论 #25065395 未加载
评论 #25065274 未加载
tannhaeuserover 4 years ago
What? Multiplexing HTTP and other traffic was the entire argument justifying HTTP&#x2F;2 and 3 complexity with multistatus etc. That server push was never going to work was clear from even a cursory look at the protocol spec and a minimal use case involving two subsequent page loads with shared resources. Was it really necessary for Google to foobar HTTP?
bullenover 4 years ago
I&#x27;m going to sound like a broken record but HTTP&#x2F;1.1 comet-stream works fine, just use &quot;transfer-encoding: chunked&quot; header in your response, write the length in hex followed by \r\n and then write the content with trailing \r\n\r\n, rinse and repeat.<p>It&#x27;s simple, debuggable, inherently avoids cache-misses, scales (if you use non-blocking IO and joint concurrent capable language with OS threads).<p>It also avoids HTTP&#x2F;TCP head-of-line because you&#x27;re using a separate socket for your pushes.