I am hosting an application on AWS, and I have a bastion host which runs HAproxy to send requests to internal app components, and in front of the bastion hosts(2 in my case and each is running haproxy) there is a Elastic loadbalancer that sends HTTP health checks to bastion hosts. The issue is those health checks do not really reflect the status of bastion hosts neither the status of HAproxy but the application as well. Is there a way, without configuring a local web backend on bastion host, to make HAproxy send http response to the loadbalancer independently from the application running on internal components?
And how do those Elastic loadbalancer health checks look like?
`The health checks are simple http get requests on specific port with a path and expected http response code and sent periodically to determine if the host is up or not and after x successful(failed) attempts the host is deemed healthy(unhealthy).
Check the monitor fail and monitor-uri docs, they allow to are URI based on backend status, for example, so you should be able to reflect the health status of your haproxy instance to the frontend Elastic load-balancer.
Thansk the monitor-uri is what I needed and it worked like charm