2

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?

2 Answers2

0
  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.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • 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. –  May 09 '16 at 06:23
  • 2
    @Tero... Sandro has found the answer at http://serverfault.com/q/775630/102173 , to be precisely at http://serverfault.com/a/765337/102173 . – Pothi Kalimuthu May 09 '16 at 12:00
0

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.

ZaxLofful
  • 101
  • 5