I'm running docker images of nginx-proxy (jwilder) and nginx-webserver (vendor nginx container).

nginx-proxy is in front of nginx-webserver.

nginx-proxy supports http2, and it is enabled by default. I can see that in chrome dev tools all my content is downloaded via h2 protocol.

But my backend (nginx-vendor) is configured to use port 80 and http1.1.

now my question is two-fold:

  1. I understand benefits of http2 for the browser/server communication. But is there a same benefit in running http2 between two nginx servers?
  2. How do I test the second nginx is using http2?
  1. It depends on how many different resources are loaded from the second server per page load. If there are several resources loaded at the same time per page load, then there is benefit.

  2. By looking at the access.log file on the second nginx server, and looking at the protocol indicated on the resource accesses.

| improve this answer | |
  • I read that speed benefits are offset by ssl penalty. Since I already have connection encrypted browser <> nginx. And both nginx are on the same server, I don't want to use ssl for nginx <> nginx also because this means having to edit config files in both nginx... is there a way to not use ssl in that case and run http2 I read spec and http2 doesn't REQUIRE ssl per se. – user113400 May 9 '16 at 6:23
  • 2
    @Tero... Sandro has found the answer at serverfault.com/q/775630/102173 , to be precisely at serverfault.com/a/765337/102173 . – Pothi Kalimuthu May 9 '16 at 12:00

Found this: https://trac.nginx.org/nginx/ticket/923

There are no plans to implement HTTP/2 support in the proxy module in the foreseeable future

Excerpt from a mail referenced in the ticket:

There is almost no sense to implement it, as the main HTTP/2 benefit is that it allows multiplexing many requests within a single connection, thus [almost] removing the limit on number of simalteneous requests - and there is no such limit when talking to your own backends. Moreover, things may even become worse when using HTTP/2 to backends, due to single TCP connection being used instead of multiple ones.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy