HAProxy community

Haproxy 2.0.5 httpchk http/2 backend

Hello,

i am testing using http/2 on backend side. So on ssl backend:

option httpchk HEAD / HTTP/1.1\r\nHost:\ serverA.domain.fqdn\r\n\User-Agent:\ serverA
server serverA ipA:443 check ssl verify none maxconn 1000 alpn h2,http/1.1

This works, if nginx has only http/1.1 enabled.
When i change to

option httpchk HEAD / HTTP/2.0\r\nHost:\ serverA.domain.fqdn\r\n\User-Agent:\ serverA

it still works.

But, when i enable “alpn http2” on nginx side, haproxy fails to checks with L7RSP. What’s correct way to check via http/2 or better way (i am checking working php/source codes availability too). Tested with all headers lowercase and failed too.

Thanks

httpchk does not support H2, therefor if you enable H2 on nginx and haproxy, H2 will be negotiated and used, which leads to failure.

Limit check alpn to http1:

server serverA ipA:443 check ssl verify none maxconn 1000 alpn h2,http/1.1 check-alpn http/1.1

Thanks, it worked.