HTTP/2 on the Upstream

Maxim Dounin mdounin at mdounin.ru
Thu Apr 13 15:07:37 UTC 2017


Hello!

On Wed, Apr 12, 2017 at 05:08:53PM -0700, Igal @ Lucee.org wrote:

> On 4/12/2017 12:59 PM, Maxim Dounin wrote:
> > It's just a matter of providing upstream servers
> > with a way to push resources, e.g., via something like the
> > X-Accel-Push header or something like this.  This doesn't need
> > HTTP/2 between nginx and upstream servers.
> 
> On 4/12/2017 2:13 PM, Igal @ Lucee.org wrote:
> >
> > If my Upstream (Tomcat, for example) generates a dynamic page for the 
> > client, then it can keep track of all of the images on that page and 
> > then push them.  How can the Upstream "tell" nginx what to Push?
> >
> 
> Upon studying HTTP/2 Push further I have learned that the way to do so 
> is with the "Link" header, e.g.
> 
> Link: </res/css/style.css>; rel=preload; as=style, </res/min/script.js>; 
> rel=preload; as=script
> 
> Chrome developer tools confirms that these assets are being pushed, so 
> it's all good.

Note: there is no HTTP/2 push support in nginx as of now.  If you 
indeed see the resources being pushed with the "Link" header, 
likely you are using cloudflare and this is something Cloudflare 
does for you.

Note well that pushing all of the resources used on the page 
is very likely to do more harm than good, since in many cases 
browsers already have static resources cached.

-- 
Maxim Dounin
http://nginx.org/


More information about the nginx mailing list