.. _envoy_v3_api_file_envoy/config/core/v3/health_check.proto: Health check ============ * Health checking :ref:`architecture overview `. * If health checking is configured for a cluster, additional statistics are emitted. They are documented :ref:`here `. .. _envoy_v3_api_msg_config.core.v3.HealthCheck: config.core.v3.HealthCheck -------------------------- `[config.core.v3.HealthCheck proto] `_ .. code-block:: json { "timeout": "{...}", "interval": "{...}", "initial_jitter": "{...}", "interval_jitter": "{...}", "interval_jitter_percent": "...", "unhealthy_threshold": "{...}", "healthy_threshold": "{...}", "reuse_connection": "{...}", "http_health_check": "{...}", "tcp_health_check": "{...}", "grpc_health_check": "{...}", "custom_health_check": "{...}", "no_traffic_interval": "{...}", "no_traffic_healthy_interval": "{...}", "unhealthy_interval": "{...}", "unhealthy_edge_interval": "{...}", "healthy_edge_interval": "{...}", "event_log_path": "...", "always_log_health_check_failures": "...", "tls_options": "{...}", "transport_socket_match_criteria": "{...}" } .. _envoy_v3_api_field_config.core.v3.HealthCheck.timeout: timeout (`Duration `_, *REQUIRED*) The time to wait for a health check response. If the timeout is reached the health check attempt will be considered a failure. .. _envoy_v3_api_field_config.core.v3.HealthCheck.interval: interval (`Duration `_, *REQUIRED*) The interval between health checks. .. _envoy_v3_api_field_config.core.v3.HealthCheck.initial_jitter: initial_jitter (`Duration `_) An optional jitter amount in milliseconds. If specified, Envoy will start health checking after for a random time in ms between 0 and initial_jitter. This only applies to the first health check. .. _envoy_v3_api_field_config.core.v3.HealthCheck.interval_jitter: interval_jitter (`Duration `_) An optional jitter amount in milliseconds. If specified, during every interval Envoy will add interval_jitter to the wait time. .. _envoy_v3_api_field_config.core.v3.HealthCheck.interval_jitter_percent: interval_jitter_percent (`uint32 `_) An optional jitter amount as a percentage of interval_ms. If specified, during every interval Envoy will add interval_ms * interval_jitter_percent / 100 to the wait time. If interval_jitter_ms and interval_jitter_percent are both set, both of them will be used to increase the wait time. .. _envoy_v3_api_field_config.core.v3.HealthCheck.unhealthy_threshold: unhealthy_threshold (`UInt32Value `_, *REQUIRED*) 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. .. _envoy_v3_api_field_config.core.v3.HealthCheck.healthy_threshold: healthy_threshold (`UInt32Value `_, *REQUIRED*) 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. .. _envoy_v3_api_field_config.core.v3.HealthCheck.reuse_connection: reuse_connection (`BoolValue `_) Reuse health check connection between health checks. Default is true. .. _envoy_v3_api_field_config.core.v3.HealthCheck.http_health_check: http_health_check (:ref:`config.core.v3.HealthCheck.HttpHealthCheck `) HTTP health check. Precisely one of :ref:`http_health_check `, :ref:`tcp_health_check `, :ref:`grpc_health_check `, :ref:`custom_health_check ` must be set. .. _envoy_v3_api_field_config.core.v3.HealthCheck.tcp_health_check: tcp_health_check (:ref:`config.core.v3.HealthCheck.TcpHealthCheck `) TCP health check. Precisely one of :ref:`http_health_check `, :ref:`tcp_health_check `, :ref:`grpc_health_check `, :ref:`custom_health_check ` must be set. .. _envoy_v3_api_field_config.core.v3.HealthCheck.grpc_health_check: grpc_health_check (:ref:`config.core.v3.HealthCheck.GrpcHealthCheck `) gRPC health check. Precisely one of :ref:`http_health_check `, :ref:`tcp_health_check `, :ref:`grpc_health_check `, :ref:`custom_health_check ` must be set. .. _envoy_v3_api_field_config.core.v3.HealthCheck.custom_health_check: custom_health_check (:ref:`config.core.v3.HealthCheck.CustomHealthCheck `) Custom health check. Precisely one of :ref:`http_health_check `, :ref:`tcp_health_check `, :ref:`grpc_health_check `, :ref:`custom_health_check ` must be set. .. _envoy_v3_api_field_config.core.v3.HealthCheck.no_traffic_interval: 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. Note that this interval takes precedence over any other. The default value for "no traffic interval" is 60 seconds. .. _envoy_v3_api_field_config.core.v3.HealthCheck.no_traffic_healthy_interval: no_traffic_healthy_interval (`Duration `_) The "no traffic healthy interval" is a special health check interval that is used for hosts that are currently passing active health checking (including new hosts) when the cluster has received no traffic. This is useful for when we want to send frequent health checks with `no_traffic_interval` but then revert to lower frequency `no_traffic_healthy_interval` once a host in the cluster is marked as healthy. Once a cluster has been used for traffic routing, Envoy will shift back to using the standard health check interval that is defined. If no_traffic_healthy_interval is not set, it will default to the no traffic interval and send that interval regardless of health state. .. _envoy_v3_api_field_config.core.v3.HealthCheck.unhealthy_interval: unhealthy_interval (`Duration `_) The "unhealthy interval" is a health check interval that is used for hosts that are marked as unhealthy. As soon as the host is marked as healthy, Envoy will shift back to using the standard health check interval that is defined. The default value for "unhealthy interval" is the same as "interval". .. _envoy_v3_api_field_config.core.v3.HealthCheck.unhealthy_edge_interval: unhealthy_edge_interval (`Duration `_) The "unhealthy edge interval" is a special health check interval that is used for the first health check right after a host is marked as unhealthy. For subsequent health checks Envoy will shift back to using either "unhealthy interval" if present or the standard health check interval that is defined. The default value for "unhealthy edge interval" is the same as "unhealthy interval". .. _envoy_v3_api_field_config.core.v3.HealthCheck.healthy_edge_interval: healthy_edge_interval (`Duration `_) The "healthy edge interval" is a special health check interval that is used for the first health check right after a host is marked as healthy. For subsequent health checks Envoy will shift back to using the standard health check interval that is defined. The default value for "healthy edge interval" is the same as the default interval. .. _envoy_v3_api_field_config.core.v3.HealthCheck.event_log_path: event_log_path (`string `_) Specifies the path to the :ref:`health check event log `. If empty, no event log will be written. .. _envoy_v3_api_field_config.core.v3.HealthCheck.always_log_health_check_failures: always_log_health_check_failures (`bool `_) If set to true, health check failure events will always be logged. If set to false, only the initial health check failure event will be logged. The default value is false. .. _envoy_v3_api_field_config.core.v3.HealthCheck.tls_options: tls_options (:ref:`config.core.v3.HealthCheck.TlsOptions `) This allows overriding the cluster TLS settings, just for health check connections. .. _envoy_v3_api_field_config.core.v3.HealthCheck.transport_socket_match_criteria: transport_socket_match_criteria (`Struct `_) Optional key/value pairs that will be used to match a transport socket from those specified in the cluster's :ref:`tranport socket matches `. For example, the following match criteria .. code-block:: yaml transport_socket_match_criteria: useMTLS: true Will match the following :ref:`cluster socket match ` .. code-block:: yaml transport_socket_matches: - name: "useMTLS" match: useMTLS: true transport_socket: name: envoy.transport_sockets.tls config: { ... } # tls socket configuration If this field is set, then for health checks it will supersede an entry of *envoy.transport_socket* in the :ref:`LbEndpoint.Metadata `. This allows using different transport socket capabilities for health checking versus proxying to the endpoint. If the key/values pairs specified do not match any :ref:`transport socket matches `, the cluster's :ref:`transport socket ` will be used for health check socket configuration. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.Payload: config.core.v3.HealthCheck.Payload ---------------------------------- `[config.core.v3.HealthCheck.Payload proto] `_ Describes the encoding of the payload bytes in the payload. .. code-block:: json { "text": "..." } .. _envoy_v3_api_field_config.core.v3.HealthCheck.Payload.text: text (`string `_, *REQUIRED*) Hex encoded payload. E.g., "000000FF". .. _envoy_v3_api_msg_config.core.v3.HealthCheck.HttpHealthCheck: config.core.v3.HealthCheck.HttpHealthCheck ------------------------------------------ `[config.core.v3.HealthCheck.HttpHealthCheck proto] `_ .. code-block:: json { "host": "...", "path": "...", "request_headers_to_add": [], "request_headers_to_remove": [], "expected_statuses": [], "codec_client_type": "...", "service_name_matcher": "{...}" } .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.host: host (`string `_) The value of the host header in the HTTP health check request. If left empty (default value), the name of the cluster this health check is associated with will be used. The host header can be customized for a specific endpoint by setting the :ref:`hostname ` field. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.path: path (`string `_, *REQUIRED*) Specifies the HTTP path that will be requested during health checking. For example */healthcheck*. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.request_headers_to_add: request_headers_to_add (**repeated** :ref:`config.core.v3.HeaderValueOption `) Specifies a list of HTTP headers that should be added to each request that is sent to the health checked cluster. For more information, including details on header value syntax, see the documentation on :ref:`custom request headers `. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.request_headers_to_remove: request_headers_to_remove (**repeated** `string `_) Specifies a list of HTTP headers that should be removed from each request that is sent to the health checked cluster. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.expected_statuses: expected_statuses (**repeated** :ref:`type.v3.Int64Range `) Specifies a list of HTTP response statuses considered healthy. If provided, replaces default 200-only policy - 200 must be included explicitly as needed. Ranges follow half-open semantics of :ref:`Int64Range `. The start and end of each range are required. Only statuses in the range [100, 600) are allowed. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.codec_client_type: codec_client_type (:ref:`type.v3.CodecClientType `) Use specified application protocol for health checks. .. _envoy_v3_api_field_config.core.v3.HealthCheck.HttpHealthCheck.service_name_matcher: service_name_matcher (:ref:`type.matcher.v3.StringMatcher `) An optional service name parameter which is used to validate the identity of the health checked cluster using a :ref:`StringMatcher `. See the :ref:`architecture overview ` for more information. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.TcpHealthCheck: config.core.v3.HealthCheck.TcpHealthCheck ----------------------------------------- `[config.core.v3.HealthCheck.TcpHealthCheck proto] `_ .. code-block:: json { "send": "{...}", "receive": [] } .. _envoy_v3_api_field_config.core.v3.HealthCheck.TcpHealthCheck.send: send (:ref:`config.core.v3.HealthCheck.Payload `) Empty payloads imply a connect-only health check. .. _envoy_v3_api_field_config.core.v3.HealthCheck.TcpHealthCheck.receive: receive (**repeated** :ref:`config.core.v3.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. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.RedisHealthCheck: config.core.v3.HealthCheck.RedisHealthCheck ------------------------------------------- `[config.core.v3.HealthCheck.RedisHealthCheck proto] `_ .. code-block:: json { "key": "..." } .. _envoy_v3_api_field_config.core.v3.HealthCheck.RedisHealthCheck.key: key (`string `_) If set, optionally perform ``EXISTS `` instead of ``PING``. 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. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.GrpcHealthCheck: config.core.v3.HealthCheck.GrpcHealthCheck ------------------------------------------ `[config.core.v3.HealthCheck.GrpcHealthCheck proto] `_ `grpc.health.v1.Health `_-based healthcheck. See `gRPC doc `_ for details. .. code-block:: json { "service_name": "...", "authority": "..." } .. _envoy_v3_api_field_config.core.v3.HealthCheck.GrpcHealthCheck.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. .. _envoy_v3_api_field_config.core.v3.HealthCheck.GrpcHealthCheck.authority: authority (`string `_) The value of the :authority header in the gRPC health check request. If left empty (default value), the name of the cluster this health check is associated with will be used. The authority header can be customized for a specific endpoint by setting the :ref:`hostname ` field. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.CustomHealthCheck: config.core.v3.HealthCheck.CustomHealthCheck -------------------------------------------- `[config.core.v3.HealthCheck.CustomHealthCheck proto] `_ Custom health check. .. code-block:: json { "name": "...", "typed_config": "{...}" } .. _envoy_v3_api_field_config.core.v3.HealthCheck.CustomHealthCheck.name: name (`string `_, *REQUIRED*) The registered name of the custom health checker. .. _envoy_v3_api_field_config.core.v3.HealthCheck.CustomHealthCheck.typed_config: typed_config (`Any `_) A custom health checker specific configuration which depends on the custom health checker being instantiated. See :api:`envoy/config/health_checker` for reference. .. _envoy_v3_api_msg_config.core.v3.HealthCheck.TlsOptions: config.core.v3.HealthCheck.TlsOptions ------------------------------------- `[config.core.v3.HealthCheck.TlsOptions proto] `_ Health checks occur over the transport socket specified for the cluster. This implies that if a cluster is using a TLS-enabled transport socket, the health check will also occur over TLS. This allows overriding the cluster TLS settings, just for health check connections. .. code-block:: json { "alpn_protocols": [] } .. _envoy_v3_api_field_config.core.v3.HealthCheck.TlsOptions.alpn_protocols: alpn_protocols (**repeated** `string `_) Specifies the ALPN protocols for health check connections. This is useful if the corresponding upstream is using ALPN-based :ref:`FilterChainMatch ` along with different protocols for health checks versus data connections. If empty, no ALPN protocols will be set on health check connections. .. _envoy_v3_api_enum_config.core.v3.HealthStatus: Enum config.core.v3.HealthStatus -------------------------------- `[config.core.v3.HealthStatus proto] `_ Endpoint health status. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.UNKNOWN: UNKNOWN *(DEFAULT)* ⁣The health status is not known. This is interpreted by Envoy as *HEALTHY*. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.HEALTHY: HEALTHY ⁣Healthy. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.UNHEALTHY: UNHEALTHY ⁣Unhealthy. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.DRAINING: DRAINING ⁣Connection draining in progress. E.g., ``_ or ``_. This is interpreted by Envoy as *UNHEALTHY*. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.TIMEOUT: TIMEOUT ⁣Health check timed out. This is part of HDS and is interpreted by Envoy as *UNHEALTHY*. .. _envoy_v3_api_enum_value_config.core.v3.HealthStatus.DEGRADED: DEGRADED ⁣Degraded.