Live data from Hacker News

Nginx HTTP/2 server push support

hg.nginx.org

11–20 of 66 posts

Re: Nginx HTTP/2 server push support

#11
post #8

How are you going to signal nginx what to push? Are you going to be able to push stuff from your application if using Nginx as a proxy? For example, a dynamic view that includes a css file hosted by nginx.

Quoting the OP:

> Also, preload links from the Link response headers, as described in https://www.w3.org/TR/preload/#server-push-http-2, can be pushed, if enabled with the "http2_push_preload" directive.

So you send down some headers in your response which tells the proxy server resources it should push. Pretty elegant, and fails gracefully. I believe this is the same mechanism as other http2 servers.

Re: Nginx HTTP/2 server push support

#12

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

According to [0] you can gain performance improvements pretty much in every scenario.

[0] https://docs.google.com/presentation/d/1r7QXGYOLCh4fcUq0jDdD...

Re: Nginx HTTP/2 server push support

#13
post #12

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

According to [0] you can gain performance improvements pretty much in every scenario. [0] https://docs.google.com/presentation/d/1r7QXGYOLCh4fcUq0jDdD...

With some exceptions, we found: https://medium.com/bbc-design-engineering/http-2-is-easy-jus...

Re: Nginx HTTP/2 server push support

#15
post #2

They did a static analysis and fixed a null pointer dereference here: https://hg.nginx.org/nginx/rev/8b0553239592

They might want to consider using clang nullability annotations (_Nullable etc) when compiling on clang. Can use a macro so it becomes a noop when the compiler does not support it. The static analyser would then get a lot of more information to work with, and it also serves as a kind of documentation.

Re: Nginx HTTP/2 server push support

#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

Post reply on HN