Hacker News new | past | comments | ask | show | jobs | submit login

They need to use push to get the most out of http2.

If they prebuild a manifest they can add X-Associated-Content to the response headers and App Engine will take care of the rest. They of course need to make sure that their static file handling has very little overhead, since doing push this way does get each resource via a request.




Someone deleted a reply, that I was trying to respond to, about App Engine and http/2 push. My reply:

App Engine has supported the X-Associated-Content header for a little while now, and also supports the Link header, with rel=preload, like:

    Link: <https://example.com/other/styles.css>; rel=preload; as=style
See http://w3c.github.io/preload/


Haha, sorry, that was me. I was eating my words, because it looks like there is support!

The experiments described in this post were conducted early this year, and it looks like those developments are fairly new?

I just discovered this too: https://github.com/GoogleChrome/http2push-gae

Is this new-ish capability documented somewhere?


Without using server push or server hinting, why would you even expected http2 to be faster? But as you point out, the article doesn't mention using either of these and the HAR seems to back that up. Weird!


> Without using server push or server hinting, why would you even expected http2 to be faster?

Because http/2 can fetch more resources in parallel, and avoid blocking one fetch behind another. http/1.1 can only open a few connections to the server at once, and due to widespread bugs, each of those connections can't pipeline by sending multiple requests and waiting for multiple responses. So you can't eliminate all the round-trip latencies. With http/2, you can send all the requests and then wait for all the responses. So even without server push or server hinting, you could request the HTML, get it back, then request all the CSS and JS files in parallel, and get them all back.


No I meant why would you expect it to be faster than bundling, not HTTP1.

When writing articles like this, there should really be more detail. We're all the scripts just script tags in the html? AMD dependencies discovered as the tree gets downloaded?

Unless you have an inefficient bundling scheme, bundling performs near optimally. It's biggest downside isn't perf but the annoyance related to having to build the bundles, scale issues on really large apps, debugging inconvenience, much worse caching characteristics, etc. HTTP2 can beat bundling perf but you're going to have to make use of http server push to do it.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: