Healthcheck

Healthchecks are used to customize the way Fastly checks on your Backends. If an origin server is marked unhealthy due to health checks, Fastly will stop attempting to send requests to it. If all origin servers are marked unhealthy, Fastly will attempt to serve stale. If no stale object is available, a 503 will be returned to the client.

Data model

check_intervalIntegerHow often to run the healthcheck in milliseconds.
commentStringA comment.
expected_responseIntegerThe status code expected from the host.
hostStringWhich host to check.
http_versionIntegerWhether to use version 1.0 or 1.1 HTTP.
initialIntegerWhen loading a config, the initial number of probes to be seen as OK.
methodStringWhich HTTP method to use.
nameStringThe name of the healthcheck.
pathStringThe path to check.
service_idStringThe alphanumeric string identifying a service.
thresholdIntegerHow many healthchecks must succeed to be considered healthy.
timeoutIntegerTimeout in milliseconds.
versionIntegerThe current version of a service.
windowIntegerThe number of most recent healthcheck queries to keep for this healthcheck.

Endpoints

List healthchecks

GET/service/service_id/version/version/healthcheck

Get a healthcheck

GET/service/service_id/version/version/healthcheck/name

Create a healthcheck

POST/service/service_id/version/version/healthcheck

Update a healthcheck

PUT/service/service_id/version/version/healthcheck/old_name

Delete a healthcheck

DELETE/service/service_id/version/version/healthcheck/name