HTTP/2 on the Upstream

Maxim Dounin mdounin at mdounin.ru
Wed Apr 12 19:59:47 UTC 2017


Hello!

On Wed, Apr 12, 2017 at 11:40:16AM -0700, Igal @ Lucee.org wrote:

> According to https://www.nginx.com/blog/http2-module-nginx/#QandA nginx 
> only supports HTTP/2 on the client side, but it is possible to configure 
> proxy_pass to use HTTP/2.
> 
> There is a huge benefit in supporting HTTP/2 on the Upstream, as that 
> will allow the Upstream servers to perform HTTP/2 Push 
> (https://en.wikipedia.org/wiki/HTTP/2_Server_Push).
> 
> While nginx can not know which resources should be pushed on a dynamic 
> page, as dynamic pages can not be simply cached across different users, 
> the Upstream servers can know which resources should be pushed.
> 
> I really think that nginx should reconsider its position on this matter.

There is nothing to stop a backend from performing a push based on 
the knowledge.  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.

Moreover, using HTTP/2 with ability to push things will likely be 
a problem here, as in most cases dynamic pages are generated 
separately from static assets.  Using nginx to do the actual 
push is likely to be much more optimal here.

> In the meantime, where can I find documentation on how to configure 
> proxy_pass to use HTTP/2?

You can't, nginx only supports HTTP/2 on the client side.  The 
actual answer was "Now you can't configure HTTP/2 with 
proxy_pass...", see here:

https://youtu.be/4OiyssTW4BA?t=14m34s

The transcript needs to be fixed, thanks.

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


More information about the nginx mailing list