Skip to main content

Health

Description

Specifies the configuration which is used to establish the health of the resource server.

Properties

The following table(s) describe the configuration properties for this component:

Name Type Constraints Description
ping PING Object

PING Object

Specifies the configuration that allows the reverse proxy to periodically ping each resource server to determine whether it is running.

Name Type Constraints Description
url string The URL to which the ping request will be sent.
policy POLICY Object
method string The HTTP method which will be used in the ping request.
rule array[string] Regular (client initiated) requests can also be observed to determine the resource server health. This entry is an ordered list of rules based on the response status codes. Status codes prefixed with a '+' are considered healthy, and codes prefixed with '-' unhealthy. The wildcard characters '*' and '?' can be used.

POLICY Object

The policy associated with the ping requests.

Name Type Constraints Description
threshold number Minimum:1
Maximum:unlimited
Default:1
Specifies how many consecutive times the ping must fail before the resource server is considered unhealthy.
timeout number Minimum:0
Maximum:unlimited
Specifies how long the reverse proxy should wait for responses to ping requests. A value of 0 will result in an indefinite wait. If not specified the timeout will default to the http or https timeout.
frequency number Minimum:0
Maximum:unlimited
Default:300
The frequency (in seconds) which ping requests will be sent. If set to 0 the ping will be disabled.
recovery RECOVERY Object
rule array[string] Specifies how to interpret responses to ping requests. This entry is an ordered list of rules based on the response status codes. Status codes prefixed with a '+' are considered healthy, and codes prefixed with '-' unhealthy. The wildcard characters '*' and '?' can be used.
RECOVERY Object

When the resource server is unhealthy, these entries specify how often they should be pinged and how many consecutive successful pings should be observed before the resource server is considered healthy again.

Name Type Constraints Description
threshold number Minimum:1
Maximum:unlimited
Default:1
Specifies how many consecutive times the ping must fail before the resource server is considered unhealthy.
frequency number Minimum:1
Maximum:unlimited
The frequency (in seconds) which ping requests will be sent. If this value is not set it will default to the value of the ping frequency.

Example

 resource_servers:
         - path: "/example"
           ...
           health:
               ping:
                   method: HEAD
                   url: /
                   policy:
                       frequency: 600
                       threshold: 1
                       recovery: 
                           frequency: 300
                           threshold: 1
                       timeout: 10
                       rule:
                           - -50?
                           - +*
                   rule:
                       - -50?
                       - +*