Health
resource_servers[]/health
Specifies the configuration which is used to establish the health of the resource server.
Properties
Name | Type | Constraints | Description |
---|---|---|---|
ping | ping |
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
Name | Type | Constraints | Description |
---|---|---|---|
method | string | The HTTP method which will be used in the ping request. | |
url | string | The URL to which the ping request will be sent. | |
policy | policy | ||
rule | Array of 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. |
resource_servers[]/health/ping/policy
The policy associated with the ping requests.
Properties
Name | Type | Constraints | Description |
---|---|---|---|
frequency | number | Minimum: 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. |
threshold | number | Minimum: 1 Maximum: unlimited Default value: 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. |
recovery | recovery | ||
rule | Array of 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. |
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
Name | Type | Constraints | Description |
---|---|---|---|
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. |
threshold | number | Minimum: 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?
- +*
Updated about 2 years ago