syntax = "proto3"; import "api/base.proto"; import "google/protobuf/wrappers.proto"; message HealthCheck { // The time to wait for a health check response. If the timeout is reached the // health check attempt will be considered a failure. Duration timeout = 1; // The interval between health checks. Duration interval = 2; // An optional jitter amount in millseconds. If specified, during every // internal Envoy will add 0 to interval_jitter to the wait time. Duration interval_jitter = 3; // 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. google.protobuf.UInt32Value unhealthy_threshold = 4; // 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. google.protobuf.UInt32Value healthy_threshold = 5; // Non-serving port for health checking. google.protobuf.UInt32Value alt_port = 6; // Reuse health check connection between health checks. Default is true. google.protobuf.BoolValue reuse_connection = 7; // Describes the encoding of the payload bytes in the payload message Payload { oneof payload { google.protobuf.StringValue text = 1; google.protobuf.BytesValue binary = 2; } } message HttpHealthCheck { // The value of the host header in the HTTPS health check request. If left // empty (default value), the IP on behalf of which this health check is // performed will be used. string host = 1; // This parameter is required if the type is http. It species the HTTP path // that will be requested during health checking. For example /healthcheck. string path = 2; Payload send = 3; Payload receive = 4; } message TcpHealthCheck { // Empty payloads imply a connect-only health check. Payload send = 1; Payload receive = 2; } oneof health_checker { HttpHealthCheck http_health_check = 8; TcpHealthCheck tcp_health_check = 9; } } enum HealthStatus { // UNKNOWN should be treated by Envoy as HEALTHY. UNKNOWN = 0; HEALTHY = 1; UNHEALTHY = 2; // Connection draining in progress - // https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/ // and // https://cloud.google.com/compute/docs/load-balancing/enabling-connection-draining. DRAINING = 3; // This value is used by HDS Remote server. From Envoy’s perspective // TIMEOUT = UNHEALTHY in case EDS returns HealthStatus. TIMEOUT = 4; }