I need to perform HTTP healthcheck on individual backend servers and load 
balance among active backend servers.This works fine with single backend server 
when we mention host name in httpchk (option httpchk GET  /info HTTP/1.1 Host:\ 
abc.mysrv1.com) 
However i am unable to successfully configure it with multiple backend servers 
as i can't give individual host name on httpchk command and with below backend 
configuration getting http 400 error - 

---------------------------------backend svc.op    balance roundrobin    mode 
http    http-send-name-header Host    option httpchk GET  /info HTTP/1.1    
http-check send-state    http-request set-uri /test/abcService    server 
abc.mysrv1.com abc.mysrv1.com:80 check    server abc.mysrv2.com  
abc.mysrv2.com:80 check---------------------------------

[WARNING] 115/162226 (4788) : Server svc.op/abc.mysrv1.com is DOWN, reason: 
Layer7 wrong status, code: 400, info: "Bad Request: missing required Host 
header", check duration: 1ms. 1 active and 0 backup servers left. 0 sessions 
active, 0 requeued, 0 remaining in queue.[WARNING] 115/162227 (4788) : Server 
svc.op/abc.mysrv2.com is DOWN, reason: Layer7 wrong status, code: 400, info: 
"Bad Request: missing required Host header", check duration: 0ms. 0 active and 
0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in 
queue.[ALERT] 115/162227 (4788) : backend ' svc.op' has no server available!

$ ./haproxy -version
HA-Proxy version 1.6.7 2016/07/13
For Reference - I see a patch was created 
https://www.mail-archive.com/haproxy@formilux.org/msg17321.html to send backend 
host and port in httpchk to perform health check on individual backend servers.

ThanksTapay

Reply via email to