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 freeform descriptive note.
expected_responseintegerThe status code expected from the host.
hoststringWhich host to check.
http_versionstringWhether 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_idstringAlphanumeric string identifying the service.
thresholdintegerHow many healthchecks must succeed to be considered healthy.
timeoutintegerTimeout in milliseconds.
versionintegerInteger identifying a service version.
windowintegerThe number of most recent healthcheck queries to keep for this healthcheck.

Endpoints

List healthchecks

GET/service/service_id/version/version_id/healthcheck

Create a healthcheck

POST/service/service_id/version/version_id/healthcheck

Get a healthcheck

GET/service/service_id/version/version_id/healthcheck/healthcheck_name

Update a healthcheck

PUT/service/service_id/version/version_id/healthcheck/healthcheck_name

Delete a healthcheck

DELETE/service/service_id/version/version_id/healthcheck/healthcheck_name