Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace HealthCheck

Health checks monitor the status of your origin servers and only route traffic to the origins that pass the health check. If the health check fails, origin is automatically removed from the load balancing. There is roughly one health check per EDGE POP per period. Any checks that pass will be reported as "healthy".

Properties

Optional expectedResponseCodeGroup

expectedResponseCodeGroup: Array<ExpectedResponseCodeGroup>

The HTTP response codes that signify a healthy state.

  • 2XX: Success response code group.
  • 3XX: Redirection response code group.
  • 4XX: Client errors response code group.
  • 5XX: Server errors response code group.

Optional expectedResponseText

expectedResponseText: undefined | string

Health check will search for the given text in a case-sensitive manner within the response body and will fail if the text is not found.

Optional headers

headers: undefined | object

HTTP header fields to include in health check requests, expressed as {@code "name": "value"} properties. Because HTTP header field names are case-insensitive, any use of names that are case-insensitive equal to other names will be rejected. If Host is not specified, requests will include a Host header field with value matching the policy's protected domain. If User-Agent is not specified, requests will include a User-Agent header field with value "waf health checks".

*Note:** The only currently-supported header fields are Host and User-Agent.

Optional healthyThreshold

healthyThreshold: undefined | number

Number of successful health checks after which the server is marked up. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Optional intervalInSeconds

intervalInSeconds: undefined | number

Time between health checks of an individual origin server, in seconds. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Optional isEnabled

isEnabled: undefined | false | true

Enables or disables the health checks.

Optional isResponseTextCheckEnabled

isResponseTextCheckEnabled: undefined | false | true

Enables or disables additional check for predefined text in addition to response code.

Optional method

method: Method

An HTTP verb (i.e. HEAD, GET, or POST) to use when performing the health check.

Optional path

path: undefined | string

Path to visit on your origins when performing the health check.

Optional timeoutInSeconds

timeoutInSeconds: undefined | number

Response timeout represents wait time until request is considered failed, in seconds. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Optional unhealthyThreshold

unhealthyThreshold: undefined | number

Number of failed health checks after which the server is marked down. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Functions

getDeserializedJsonObj

getJsonObj