HAProxy Enterprise Documentation 1.8r2
HTTP Health Checks
An HTTP-layer health check sends an HTTP OPTIONS request to the server and expects to get a successful response. To enable it, add option httpchk
to the backend
section:
backend be_myapp
option httpchk
server srv1 192.168.1.5:80 check
Checks are sent using GET to the URL / by default.
You can change the HTTP method and URL by specifying them on the option httpchk
line. In the following example, checks are sent using GET to the URL /healthz:
backend be_myapp
option httpchk GET /healthz
server srv1 10.0.0.1:80 check
server srv2 10.0.0.2:80 check
If the response status code is in the 2xx or 3xx range, the server is healthy.
Next up
Health Check Interval