Hey everyone,
TL;DR: Is it possible to make use of a /health endpoint that is running locally on the HAProxy box, when doing health checks for a back-end? I know that we can specify a health-checking endpoint running on the remote server, e.g.:
backend myserver
option httpchk
http-check send meth GET uri /health
http-check expect status 200
http-check expect string GOOD
But, would it be possible to use a /health endpoint that is not running on that backend server in the health evaluation process, but instead locally (or somewhere completely different)? i.e.:
backend myserver
option httpchk
http-check send meth GET uri **localhost:8001**/health
http-check expect status 200
http-check expect string GOOD
I wrote a pretty involved health-checker that I meant to have running on each HAProxy box, that itself would continuously monitor, and steer backend-resources, under the assumption that I could make use of a /health endpoint elsewhere than running on the backend in question. I would prefer not to do a whole redesign and run the services on the backends themselves, so I’d greatly appreciate any and all input here.
Cheers