Health check

Health checks 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 health check in milliseconds.
commentstringA freeform descriptive note.
expected_responseintegerThe status code expected from the host.
headersarrayArray of custom headers that will be added to the health check probes.
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 health check.
pathstringThe path to check.
thresholdintegerHow many health checks must succeed to be considered healthy.
timeoutintegerTimeout in milliseconds.
windowintegerThe number of most recent health check queries to keep for this health check.
created_atstringDate and time in ISO 8601 format. Read-only.
deleted_atstringDate and time in ISO 8601 format. Read-only.
service_idstringAlphanumeric string identifying the service. Read-only.
updated_atstringDate and time in ISO 8601 format. Read-only.
versionintegerInteger identifying a service version. Read-only.

Endpoints

List health checks

GET/service/service_id/version/version_id/healthcheck

Create a health check

POST/service/service_id/version/version_id/healthcheck

Get a health check

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

Update a health check

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

Delete a health check

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