HAProxy community

Use haproxy with http2 backends and non http2 backends



I have an haproxy configuration where one frontend redirects to multiple backend depending on the SNI.

However I want to switch one of those backends to http2 and keep all the other on http1.1

My problem is I can’t find a way to tell haproxy that it should only accept http1 for a backend and accept http1 and http2 for the other.

Any idea if it feasible or not ?


Yes, set it up like this:

Make sure you have dedicated certificates for HTTP/2 and HTTP/1, without overlapping SANs, otherwise SNI routing fails.

Also, yuor backend has to support HTTP/2 for this, as Haproxy doesn’t (so we need to tunnel).