resource_servers[]/health

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

Properties

NameTypeConstraintsDescription
pingping

resource_servers[]/health/ping

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

Properties

NameTypeConstraintsDescription
methodstringThe HTTP method which will be used in the ping request.
urlstringThe URL to which the ping request will be sent.
policypolicy
ruleArray of stringRegular (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.

resource_servers[]/health/ping/policy

The policy associated with the ping requests.

Properties

NameTypeConstraintsDescription
frequencynumberMinimum: 0

Maximum: unlimited

Default value: 300
The frequency (in seconds) which ping requests will be sent. If set to 0 the ping will be disabled.
thresholdnumberMinimum: 1

Maximum: unlimited

Default value: 1
Specifies how many consecutive times the ping must fail before the resource server is considered unhealthy.
timeoutnumberMinimum: 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.
recoveryrecovery
ruleArray of stringSpecifies 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.

resource_servers[]/health/ping/policy/recovery

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.

Properties

NameTypeConstraintsDescription
frequencynumberMinimum: 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.
thresholdnumberMinimum: 1

Maximum: unlimited

Default value: 1
Specifies how many consecutive times the ping must fail before the resource server is considered unhealthy.

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?
        - +*

Did this page help you?