HAProxy Enterprise Documentation 2.0r1

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 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 check
   server srv2 check

If the response status code is in the 2xx or 3xx range, the server is healthy.

Next up

Health Check Interval