Live data from Hacker News

Nginx-1.14.0 stable version has been released

nginx.org

11–20 of 68 posts

Re: Nginx-1.14.0 stable version has been released

#11

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

It's a way to preemptively send assets to the client before they request them.

Re: Nginx-1.14.0 stable version has been released

#12

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

That command probably goes in a "location" block that matches the set of HTML pages that use main.css.

Normally, the browser parses HTML, finds a tag that mentions main.css, and then requests main.css. With HTTP/2 push, by the time the browser has finished parsing the tag, main.css has already been delivered.

If the browser already has main.css in its cache, it can reject the push.

Re: Nginx-1.14.0 stable version has been released

#13

They really need proper release notes, it's very hard to find a list of the changes in this new version...

https://nginx.org/en/CHANGES-1.14 ^^^ Hard to find, though.

That just says:

    *) 1.14.x stable branch.
which doesn't mean anything...

Re: Nginx-1.14.0 stable version has been released

#14

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

Let's say you have an HTML page which links to main.css. Ordinarily, the request goes:

    Client: GET /index.html
    Server: 
    Client (after parsing): GET /main.css
    Server: 
Loading the page thus takes 2 round trips, one for the main page and one for the content. (Or more, if you have e. g. includes in the CSS.) Here's what it would look like with HTTP/2 Push:

    Client: GET /index.html
    Server: ,  (PUSH)
This only takes 1 round trip; since the server knows that main.css will be required shortly it can preemptively send it. In particular, this might offer a significant speedup for high-latency connections; it also theoretically reduces the need for bundling tools since you can have the server just push all of the individual files.

The obvious problem with this scheme is that if the client already has main.css then it's a waste of bandwidth to send it again. The client can cancel the push, but by the time it finds out about it a bunch of data has already been sent. There is a proposal for 'Cache Digests' which will allow the client to send a Bloom filter of its cache so the server can tell whether or not it has the file already, but as far as I'm aware no major client or server has implemented this yet.

Re: Nginx-1.14.0 stable version has been released

#15

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

If you agree that using a CDN for static content is a good idea, then it would seem HTTP/2 Push is useless. The website is served from your servers while the static content is served from a CDN so you can't "push" it in the same stream as you webpage content. Am I missing something here?

Re: Nginx-1.14.0 stable version has been released

#16
gRPC support is very welcome! I've used gRPC internally but have felt a bit uncomfortable exposing a server directly to the internet for outside client use. Not to mention difficulties deploying in a downtime-free manner.

gRPC + TLS in nginx will allow connections from outside that I'm comfortable with. Great improvement!

Re: Nginx-1.14.0 stable version has been released

#17

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

I think there's a common misconception with the term "push". HTTP2 doesn't push in terms of a push notification, but rather "pushes" assets down the connection that are known to be needed by the currently transferred document (whatever that may be).

That way, the web server can pro-actively push the named stylesheet to the client as it knows that the stylesheet is needed to render the page. That way the client doesn't have to ask the server (which would result in a new roundtrip).

Re: Nginx-1.14.0 stable version has been released

#18

Earlier quoted context omitted.

https://nginx.org/en/CHANGES-1.14 ^^^ Hard to find, though.

That just says: *) 1.14.x stable branch. which doesn't mean anything...

It's because Nginx uses even numbers for stable releases (very few changes) and odd versions for mainline releases (production-ready, but frequently improved/changed). 1.14.0 is the exact same version of 1.13.12.

Re: Nginx-1.14.0 stable version has been released

#19

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

In 2016, the Chromium team at Google produced a document [1] that examines usecases for HTTP/2 Push, talks about deployment models, and analyzes whether it's worth it. In this particular case, you'd push static content because you know it will be needed later, and this way the information arrives in the HTTP header instead of in the payload's content body, so by the time 'main.css' is needed, the UA's HTTP cache may already be populated with the file.

That being said, I fail to see how in the general case, setting static headers in the server software's config for Push is useful [2][3], and wish that more implementations converged on a common way of describing what to push [4], so that tools could be built around discovering dependencies, and around interpreting that manifest to execute push.

[1] https://docs.google.com/document/d/1K0NykTXBbbbTlv60t5MyJvXj... [2] https://news.ycombinator.com/item?id=14077955#14081237 [3] https://news.ycombinator.com/item?id=12719563#12722383 [4] https://github.com/GoogleChromeLabs/http2-push-manifest

Re: Nginx-1.14.0 stable version has been released

#20
post #15

>http2_push /static/css/main.css; Silly question, but what's the use case for the HTTP/2 Push? Their example with pushing doesn't make sense to me. Why would you want to push static content?

If you agree that using a CDN for static content is a good idea, then it would seem HTTP/2 Push is useless. The website is served from your servers while the static content is served from a CDN so you can't "push" it in the same stream as you webpage content. Am I missing something here?

Yes, you can't push cross-origin.[1] However, there's still a lot of use-cases where this is useful, such as if your entire site is static content, or if your app servers are behind the CDN as well.

[1]: Yet. I believe the web packaging standard (intended, among other things, to replace AMP) allows pushing bundles signed by other origins.

Post reply on HN