Note

HTTP2 protocol only works on systems with OpenSSL 1.0.2 or later. Hence, you can enable it on Debian 9, Ubuntu 16.04, RHEL, or CentOS, but not on Debian 8, Ubuntu 14.04.

To enable support for HTTP/2 on a front-end server, you configure the bind line in the configuration file's frontend section as an ssl endpoint, and alpn must announce h2, as follows:

frontend f_myapp
  bind :443 ssl crt /path/to/cert.crt alpn h2,http/1.1
  mode http

Note

When you expect large file uploads over a network with moderately high latency, you may experience slow upload speeds. You can increase the HTTP/2 Flow Control window size to allow HAProxy to buffer more data. Set tune.h2.initial-window-size in the global section to a value like 1048576.