Http/2 breaks http-reuse always

I have a setup where the frontend is configured with keepalive and backend configured with http-reuse always. This allows having a lot of client connections to haproxy with only a few connections to apache backend.

It was working perfectly with very low apache processes until I enabled http/2 !
I have the feeling that haproxy no longer reuse http connections the way it did without http/2 and uses a lot more connections to apache.

Here is apache connection graph :

backend bk
    option http-keep-alive
    option persist
    http-reuse always
    server web1 x.x.x.x:8000

frontend front
    bind x.x.x.x:443 ssl crt all/ alpn h2,http/1.1
    option http-keep-alive
    default_backend bk


This is unfortunately a limitation of H2 for now.


Hello Baptiste,

Do you think a fix will be planned for next release, maybe 1.9 ?

Thank you



This is expected to be fixed with HTTP/2 on the server side. Might be 1.9 or the release after.


Wondering about this. Tried using alpn h2 in 1.9.8 but still get the connections to the backend closed after the client ends the request. Also tried proto h2 but the result has been an error MUX protocol 'h2' is not usable for 'bind... (and the same for the backend).
Is this feature already implemented in 1.9.8 and I’m doing something wrong in my configuration or is still expected on the next release?

You need to enable option http-use-htx.