Thankyou Willy for the prompt response. We have a lot of servers, 100s of them, but we are generating the configs using scripts so this logically work for us, just that it would make the config long and complex. I will try it out.
Thanks Sachin On Wed, Jan 2, 2019 at 7:43 PM Willy Tarreau <[email protected]> wrote: > Hi Sachin, > > On Wed, Jan 02, 2019 at 07:33:03PM +0530, Sachin Shetty wrote: > > Hi Willy, > > > > It seems the http-send-name-header directive is not sent with > health-check > > and I need it in the health-check as well :) > > Indeed it's not supported there because the health checks are independant > on the traffic and could even be sent somewhere else. Also the request is > forged per backend and the same request is sent to all servers in the farm. > > > is there a way to make it work with health-check as well? > > There is a solution, it's not pretty, it depends on the number of servers > you're dealing with in your farm. The solution consists in replacing health > checks with trackers and to manually configure your health checks in > separate > backends, one per server. For example : > > backend my_prod_backend > server s1 1.1.1.1:80 track chk_s1/srv > server s2 1.1.1.2:80 track chk_s2/srv > server s3 1.1.1.3:80 track chk_s3/srv > > backend chk_s1 > option httpchk GET /foo "HTTP/1.0\r\nHost: blah\r\nsrv: s1" > server srv 1.1.1.1:80 check > > backend chk_s2 > option httpchk GET /foo "HTTP/1.0\r\nHost: blah\r\nsrv: s2" > server srv 1.1.1.1:80 check > > backend chk_s3 > option httpchk GET /foo "HTTP/1.0\r\nHost: blah\r\nsrv: s3" > server srv 1.1.1.1:80 check > > As you can see, the check is performed by these chk_* backends, and > reflected in the prod backend thanks to the "track" directive. I know > it's not pretty but it provides a lot of flexibility, including the > ability to have different checks per server. > > We definitely need to revamp all the check subsystem to bring more > flexibility... > > Cheers, > Willy >

