Search code examples
load-balancinghaproxy

haproxy https health checks


Hi I am using haproxy to load balance my https connections. I want to do active health checks however they don't seem to work. Any tips on how to correctly write the below would be welcome. I have them working fine for http port 80 connections.

frontend incoming_https
  bind *:443
  mode tcp
  default_backend web_https

backend web_https
    mode tcp
    option httpchk GET / HTTP/1.1\r\nHost:\ https://www.mysite.com
    server web-0 xxx.xxx.xxx.xxx:443 check inter 5000 port 443

Solution

  • You can't use option httpchk in tcp mode.

    You'll probably want to read up on option ssl-hello-chk.