Health check¶
- Health checking architecture overview.
- If health checking is configured for a cluster, additional statistics are emitted. They are documented here.
core.HealthCheck¶
{
"timeout": "{...}",
"interval": "{...}",
"interval_jitter": "{...}",
"unhealthy_threshold": "{...}",
"healthy_threshold": "{...}",
"reuse_connection": "{...}",
"http_health_check": "{...}",
"tcp_health_check": "{...}",
"redis_health_check": "{...}",
"grpc_health_check": "{...}",
"no_traffic_interval": "{...}"
}
- timeout
- (Duration) The time to wait for a health check response. If the timeout is reached the health check attempt will be considered a failure.
- interval
- (Duration) The interval between health checks.
- interval_jitter
- (Duration) An optional jitter amount in millseconds. If specified, during every internal Envoy will add 0 to interval_jitter to the wait time.
- unhealthy_threshold
- (UInt32Value) The number of unhealthy health checks required before a host is marked unhealthy. Note that for http health checking if a host responds with 503 this threshold is ignored and the host is considered unhealthy immediately.
- healthy_threshold
- (UInt32Value) The number of healthy health checks required before a host is marked healthy. Note that during startup, only a single successful health check is required to mark a host healthy.
- reuse_connection
- (BoolValue) Reuse health check connection between health checks. Default is true.
- http_health_check
(core.HealthCheck.HttpHealthCheck) HTTP health check.
Precisely one of http_health_check, tcp_health_check, redis_health_check, grpc_health_check must be set.
- tcp_health_check
(core.HealthCheck.TcpHealthCheck) TCP health check.
Precisely one of http_health_check, tcp_health_check, redis_health_check, grpc_health_check must be set.
- redis_health_check
(core.HealthCheck.RedisHealthCheck) Redis health check.
Precisely one of http_health_check, tcp_health_check, redis_health_check, grpc_health_check must be set.
- grpc_health_check
(core.HealthCheck.GrpcHealthCheck) gRPC health check.
Precisely one of http_health_check, tcp_health_check, redis_health_check, grpc_health_check must be set.
- no_traffic_interval
(Duration) The “no traffic interval” is a special health check interval that is used when a cluster has never had traffic routed to it. This lower interval allows cluster information to be kept up to date, without sending a potentially large amount of active health checking traffic for no reason. Once a cluster has been used for traffic routing, Envoy will shift back to using the standard health check interval that is defined.
The default value for “no traffic interval” is 60 seconds.
core.HealthCheck.Payload¶
[core.HealthCheck.Payload proto]
Describes the encoding of the payload bytes in the payload.
{
"text": "..."
}
core.HealthCheck.HttpHealthCheck¶
[core.HealthCheck.HttpHealthCheck proto]
{
"host": "...",
"path": "...",
"service_name": "..."
}
- host
- (string) The value of the host header in the HTTP health check request. If left empty (default value), the IP on behalf of which this health check is performed will be used.
- path
- (string, REQUIRED) Specifies the HTTP path that will be requested during health checking. For example /healthcheck.
- service_name
- (string) An optional service name parameter which is used to validate the identity of the health checked cluster. See the architecture overview for more information.
core.HealthCheck.TcpHealthCheck¶
[core.HealthCheck.TcpHealthCheck proto]
{
"send": "{...}",
"receive": []
}
- send
- (core.HealthCheck.Payload) Empty payloads imply a connect-only health check.
- receive
- (core.HealthCheck.Payload) When checking the response, “fuzzy” matching is performed such that each binary block must be found, and in the order specified, but not necessarily contiguous.
core.HealthCheck.RedisHealthCheck¶
[core.HealthCheck.RedisHealthCheck proto]
{
"key": "..."
}
- key
- (string) If set, optionally perform
EXISTS <key>
instead ofPING
. A return value from Redis of 0 (does not exist) is considered a passing healthcheck. A return value other than 0 is considered a failure. This allows the user to mark a Redis instance for maintenance by setting the specified key to any value and waiting for traffic to drain.
core.HealthCheck.GrpcHealthCheck¶
[core.HealthCheck.GrpcHealthCheck proto]
grpc.health.v1.Health-based healthcheck. See gRPC doc for details.
{
"service_name": "..."
}
- service_name
- (string) An optional service name parameter which will be sent to gRPC service in grpc.health.v1.HealthCheckRequest. message. See gRPC health-checking overview for more information.