CoffeeSprout / ansible-role-haproxy

Setup HAProxy
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Don't default to standard HTTP check and allow custom URL to query #5

Open bvansomeren opened 3 years ago

bvansomeren commented 3 years ago

The role by default just adds a "check" to each server, however just loading the / url may give errors (403, 404 etc) causing the backend to fail. Also we might want to check an API endpoint.

We should implement:

bvansomeren commented 3 years ago

More documentation:

https://www.haproxy.com/blog/using-haproxy-as-an-api-gateway-part-3-health-checks/

Basically support adding:

option httpchk GET /check HTTP/1.1\r\nHost:\ mywebsite.com

Many deployments require HTTP 1.1 and host headers so might as well make that the default