Live data from Hacker News

Nginx HTTP/2 server push support

hg.nginx.org

31–40 of 66 posts

Re: Nginx HTTP/2 server push support

#31

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'…

With you on that one - h2o is a lovely server

Re: Nginx HTTP/2 server push support

#33

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, but could be completely wrong, that browsers can reject a pushed resource at the start. Since the "connection" cost for each resource is minimal, this wouldn't be too much of a problem. Someone confirm or deny this.

Re: Nginx HTTP/2 server push support

#34

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'…

My web dev company now has a few small clients on h2o for the same reasons. It gives us a chance to try h2o out without any downfall. Still very early but loving it.

Re: Nginx HTTP/2 server push support

#35

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.

Ugh. That would work, but it’s such a hack. There should be a mechanism specifically for this. Is there’s no other good way?

Re: Nginx HTTP/2 server push support

#36

Are there any good general guidelines on when you should use HTTP2 push? Edit: Oops, I missed out "push" at the end.

You might want to read https://jakearchibald.com/2017/h2-push-tougher-than-i-though... This is specific to H2 Push

Yes, I read a few articles like this and it doesn't seem clear when you should use HTTP2 push.

Re: Nginx HTTP/2 server push support

#37

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…

Most of the discussion surrounding H2 PUSH is concentrated on the single use case of static assets. It's true that this one is difficult, but there are other use cases.

For example, say you had a chart on your page that is generated with JavaScript. That JavaScript makes an API call to get data. You can go ahead and push this data when the page is requested. Since it's (usually) dynamic you don't have to worry about caching nearly as much.

This type of thing is extremely common, but when it comes to H2 everyone is focused on the hardest thing.

Re: Nginx HTTP/2 server push support

#39
post #5

Are there any good general guidelines on when you should use HTTP2 push? Edit: Oops, I missed out "push" at the end.

I would suggest using HTTP/2 whenever possible. Features like connection multiplexing and pipelining alone are huge benefits.

Research by Homaan Behesti of Fastly (above at https://news.ycombinator.com/item?id=16365413#16365605) suggest that you test h2 with your site and see how h2 compares to h1.

Re: Nginx HTTP/2 server push support

#40

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, but could be completely wrong, that browsers can reject a pushed resource at the start. Since the "connection" cost for each resource is minimal, this wouldn't be too much of a problem. Someone confirm or deny this.

with http2 server push the server first sends a frame advertising it's going to push some resource (denoted by it's uri). the client can reject this resource before it's sent. this means the server has to delay sending to give the client the opportunity, however
Post reply on HN