You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
142 lines
4.9 KiB
142 lines
4.9 KiB
8 years ago
|
syntax = "proto3";
|
||
|
|
||
8 years ago
|
package envoy.api.v2;
|
||
|
|
||
8 years ago
|
import "google/protobuf/duration.proto";
|
||
8 years ago
|
import "google/protobuf/wrappers.proto";
|
||
|
|
||
7 years ago
|
import "validate/validate.proto";
|
||
|
|
||
|
// [#protodoc-title: Health check]
|
||
|
// * Health checking :ref:`architecture overview <arch_overview_health_checking>`.
|
||
|
// * If health checking is configured for a cluster, additional statistics are emitted. They are
|
||
|
// documented :ref:`here <config_cluster_manager_cluster_stats>`.
|
||
|
|
||
8 years ago
|
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.
|
||
7 years ago
|
google.protobuf.Duration timeout = 1 [(validate.rules).duration.required = true];
|
||
|
|
||
8 years ago
|
// The interval between health checks.
|
||
7 years ago
|
google.protobuf.Duration interval = 2 [(validate.rules).duration.required = true];
|
||
|
|
||
8 years ago
|
// An optional jitter amount in millseconds. If specified, during every
|
||
|
// internal Envoy will add 0 to interval_jitter to the wait time.
|
||
8 years ago
|
google.protobuf.Duration interval_jitter = 3;
|
||
8 years ago
|
|
||
|
// The number of unhealthy health checks required before a host is marked
|
||
7 years ago
|
// unhealthy. Note that for *http* health checking if a host responds with 503
|
||
8 years ago
|
// this threshold is ignored and the host is considered unhealthy immediately.
|
||
|
google.protobuf.UInt32Value unhealthy_threshold = 4;
|
||
7 years ago
|
|
||
8 years ago
|
// 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;
|
||
|
|
||
7 years ago
|
// [#not-implemented-hide:] Non-serving port for health checking.
|
||
8 years ago
|
google.protobuf.UInt32Value alt_port = 6;
|
||
7 years ago
|
|
||
8 years ago
|
// Reuse health check connection between health checks. Default is true.
|
||
|
google.protobuf.BoolValue reuse_connection = 7;
|
||
|
|
||
7 years ago
|
// Describes the encoding of the payload bytes in the payload.
|
||
8 years ago
|
message Payload {
|
||
|
oneof payload {
|
||
7 years ago
|
option (validate.required) = true;
|
||
|
|
||
|
// Hex encoded payload. E.g., "000000FF".
|
||
7 years ago
|
string text = 1 [(validate.rules).string.min_bytes = 1];
|
||
7 years ago
|
|
||
|
// [#not-implemented-hide:] Binary payload.
|
||
8 years ago
|
bytes binary = 2;
|
||
8 years ago
|
}
|
||
|
}
|
||
7 years ago
|
|
||
8 years ago
|
message HttpHealthCheck {
|
||
7 years ago
|
// [#not-implemented-hide:] 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.
|
||
8 years ago
|
string host = 1;
|
||
7 years ago
|
|
||
|
// Specifies the HTTP path that will be requested during health checking. For example
|
||
|
// */healthcheck*.
|
||
7 years ago
|
string path = 2 [(validate.rules).string.min_bytes = 1];
|
||
7 years ago
|
|
||
|
// [#not-implemented-hide:] HTTP specific payload.
|
||
8 years ago
|
Payload send = 3;
|
||
7 years ago
|
|
||
|
// [#not-implemented-hide:] HTTP specific response.
|
||
8 years ago
|
Payload receive = 4;
|
||
7 years ago
|
|
||
|
// An optional service name parameter which is used to validate the identity of
|
||
|
// the health checked cluster. See the :ref:`architecture overview
|
||
|
// <arch_overview_health_checking_identity>` for more information.
|
||
7 years ago
|
string service_name = 5;
|
||
8 years ago
|
}
|
||
7 years ago
|
|
||
8 years ago
|
message TcpHealthCheck {
|
||
|
// Empty payloads imply a connect-only health check.
|
||
|
Payload send = 1;
|
||
7 years ago
|
|
||
7 years ago
|
// When checking the response, “fuzzy” matching is performed such that each
|
||
|
// binary block must be found, and in the order specified, but not
|
||
7 years ago
|
// necessarily contiguous.
|
||
7 years ago
|
repeated Payload receive = 2;
|
||
|
}
|
||
7 years ago
|
|
||
7 years ago
|
message RedisHealthCheck {
|
||
|
}
|
||
7 years ago
|
|
||
7 years ago
|
// [#not-implemented-hide:] `grpc.health.v1.Health
|
||
|
// <https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto>`_-based
|
||
|
// healthcheck. See `gRPC doc <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_
|
||
|
// for details.
|
||
|
message GrpcHealthCheck {
|
||
|
// An optional service name parameter which will be sent to gRPC service in
|
||
|
// `grpc.health.v1.HealthCheckRequest
|
||
|
// <https://github.com/grpc/grpc/blob/master/src/proto/grpc/health/v1/health.proto#L20>`_.
|
||
|
// message. See `gRPC health-checking overview
|
||
|
// <https://github.com/grpc/grpc/blob/master/doc/health-checking.md>`_ for more information.
|
||
|
string service_name = 1;
|
||
|
}
|
||
|
|
||
8 years ago
|
oneof health_checker {
|
||
7 years ago
|
option (validate.required) = true;
|
||
|
|
||
|
// HTTP health check.
|
||
7 years ago
|
HttpHealthCheck http_health_check = 8;
|
||
7 years ago
|
|
||
|
// TCP health check.
|
||
7 years ago
|
TcpHealthCheck tcp_health_check = 9;
|
||
7 years ago
|
|
||
|
// Redis health check.
|
||
7 years ago
|
RedisHealthCheck redis_health_check = 10;
|
||
7 years ago
|
|
||
|
// [#not-implemented-hide:] GRPC health check.
|
||
|
GrpcHealthCheck grpc_health_check = 11;
|
||
8 years ago
|
}
|
||
|
}
|
||
8 years ago
|
|
||
7 years ago
|
// [#not-implemented-hide:] Part of HDS.
|
||
8 years ago
|
enum HealthStatus {
|
||
|
// UNKNOWN should be treated by Envoy as HEALTHY.
|
||
|
UNKNOWN = 0;
|
||
7 years ago
|
|
||
|
// Healthy.
|
||
8 years ago
|
HEALTHY = 1;
|
||
7 years ago
|
|
||
|
// Unhealthy.
|
||
8 years ago
|
UNHEALTHY = 2;
|
||
7 years ago
|
|
||
|
// Connection draining in progress. E.g.,
|
||
8 years ago
|
// https://aws.amazon.com/blogs/aws/elb-connection-draining-remove-instances-from-service-with-care/
|
||
7 years ago
|
// or
|
||
8 years ago
|
// https://cloud.google.com/compute/docs/load-balancing/enabling-connection-draining.
|
||
|
DRAINING = 3;
|
||
7 years ago
|
|
||
8 years ago
|
// This value is used by HDS Remote server. From Envoy’s perspective
|
||
|
// TIMEOUT = UNHEALTHY in case EDS returns HealthStatus.
|
||
|
TIMEOUT = 4;
|
||
|
}
|