Health check with haproxy

I’m trying to use a haproxy to balance connection to gelf tpc input on multiple nodes. It works fine but the heath check based on “/api/system/lbstatus” it seems to work but haproxy continue to send data to “DEAD” node also when the node is cosidered DOWN.

this is the haproxy config:

frontend graylog
bind xxx.xxx.107.120:12201
mode tcp
option tcplog
default_backend graylog
timeout client 1m

backend graylog
mode tcp
option tcplog
option log-health-checks
option redispatch
option httpchk GET /api/system/lbstatus
balance roundrobin
timeout check 5s
timeout connect 10s
timeout server 1m
server graylog02 prd-graylog02:12201 check port 9000
server graylog03 prd-graylog03:12201 check port 9000
server graylog04 prd-graylog04:12201 check port 9000
server graylog05 prd-graylog05:12201 check port 9000
server graylog06 prd-graylog06:12201 check port 9000
server graylog07 prd-graylog07:12201 check port 9000

I’ve tried both check on string “ALIVE/DEAD” or return code

any idea how to disable effectively a node?
thank you

found how to make it works. is someone is interested it is enough to add “on-marked-down shutdown-sessions” in servers-default.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.