Live data from Hacker News

Nginx HTTP/2 server push support

hg.nginx.org

21–30 of 66 posts

Re: Nginx HTTP/2 server push support

#21
Please correct me if I'm wrong in anything I say here. I haven't had any real-world deployment experiences with HTTP 2.0.

Every time I've tried looking into it, I've found it underwhelming. Infrastructure support and tooling is still heavily lacking as far as I can tell. To really take advantage of server push it seems like you'd need to have really good build tools available.

Don't you risk sending useless data with server push? How do you handle cached resources? Just because a view depends on some resources, it doesn't mean you always need to send em down to the client.

Having server push doesn't always mean you should avoid bundling and minifying resources. Won't a gzipped bundle typically produce a smaller payload?

Maybe I'm totally wrong or I've misunderstood something, but the general impression I've gotten is that the benefits of server push are a bit overstated. Does anyone have links to resources which discusses these issues in depth?

Re: Nginx HTTP/2 server push support

#23

Please correct me if I'm wrong in anything I say here. I haven't had any real-world deployment experiences with HTTP 2.0. Every time I've tried looking into it, I've found it underwhelming. Infrastructure support and tooling is still heavily lacking as far as I can tell. To really take advantage of server push it seems like you'd need to have really good build tools available. Don't you risk sending useless data with…

Take a look at my other comment, but in short, it's hard. You also have to account in the client's download speed.

The point of server to push is to _preload_ content, and reduce the amount of requests, not to reduce total download size.

Re: Nginx HTTP/2 server push support

#24

Interesting video about HTTP 2. https://www.youtube.com/watch?v=0yzJAKknE_k

Excellent talk & speaker, slides https://www.slideshare.net/Fastly/http2-what-no-one-is-telli...

Follow up talk Revisiting HTTP/2 given Jan 31, 2018 https://www.youtube.com/watch?v=wR1gF5Lhcq0 & slides https://www.slideshare.net/Fastly/revisiting-http2-87148462

Re: Nginx HTTP/2 server push support

#25
post #20

Can somebody explain in simple words what HTTP/2 push means? Example?

Client: may I get /index.html please? Server: sure, here's index.html, theme.css, and jquery.js. Client: hey wait! I didn't ask for... oh, nvm, good call. Now I can display all this without asking you for anything else. EDIT: See this: https://youtu.be/0yzJAKknE_k?t=30m52s for more details

And add-track.js, flash-banner.gif?

Re: Nginx HTTP/2 server push support

#26

Please correct me if I'm wrong in anything I say here. I haven't had any real-world deployment experiences with HTTP 2.0. Every time I've tried looking into it, I've found it underwhelming. Infrastructure support and tooling is still heavily lacking as far as I can tell. To really take advantage of server push it seems like you'd need to have really good build tools available. Don't you risk sending useless data with…

I think (not sure if this has been agreed as best practice) that you can use cookies to decide which content to push. This should work in most cases - set a cookie that lasts as long as your users' cache, and don't do server push if that cookie exists.

Re: Nginx HTTP/2 server push support

#28
post #25
post #20

Earlier quoted context omitted.

Client: may I get /index.html please? Server: sure, here's index.html, theme.css, and jquery.js. Client: hey wait! I didn't ask for... oh, nvm, good call. Now I can display all this without asking you for anything else. EDIT: See this: https://youtu.be/0yzJAKknE_k?t=30m52s for more details

And add-track.js, flash-banner.gif?

This is just fancy cache-prewarming. The client still decides what resources to request, but those it wants to fetch are available locally at request time.

("just" as a qualifier for nefariousness, not usefulness)

Re: Nginx HTTP/2 server push support

#29

Awesome. Is this going to make it into stable 1.12.X?

No, new features don't usually get backported to the stable branch.

It will ship with 1.13.9 (mainline) in 6 hours (at the time of writing).

For stable branch, you need to wait until the 1.13 milestone is completed, which according to their roadmap (https://trac.nginx.org/nginx/milestone/1.13) will be completed in 8 weeks.

Re: Nginx HTTP/2 server push support

#30
I've recently spent more time using H2O over nginx, mainly because of its more complete support of HTTP 2 (push, cache-aware push, ..) but also out of the box support for brotli compression and mruby (think lua landscape for nginx). Even though nginx made it easier to build and ship third party modules separately, I feel like the module community (as well as distro maintainers/packagers) haven't followed suit. There's obviously pre-baked packages like openresty which has lua world, but then there's no brotli.
Post reply on HN