http: Add content-based health check for upstream (#22212)

Signed-off-by: Boteng Yao <boteng@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ ea0eb2d5ea3f82250f3577c7ac5a898087d0799f
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent 77b7be67de
commit 2bdc71af3f
  1. 22
      envoy/config/core/v3/health_check.proto

@ -75,12 +75,12 @@ message HealthCheck {
// Hex encoded payload. E.g., "000000FF". // Hex encoded payload. E.g., "000000FF".
string text = 1 [(validate.rules).string = {min_len: 1}]; string text = 1 [(validate.rules).string = {min_len: 1}];
// [#not-implemented-hide:] Binary payload. // Binary payload.
bytes binary = 2; bytes binary = 2;
} }
} }
// [#next-free-field: 14] // [#next-free-field: 15]
message HttpHealthCheck { message HttpHealthCheck {
option (udpa.annotations.versioning).previous_message_type = option (udpa.annotations.versioning).previous_message_type =
"envoy.api.v2.core.HealthCheck.HttpHealthCheck"; "envoy.api.v2.core.HealthCheck.HttpHealthCheck";
@ -103,8 +103,20 @@ message HealthCheck {
// [#not-implemented-hide:] HTTP specific payload. // [#not-implemented-hide:] HTTP specific payload.
Payload send = 3; Payload send = 3;
// [#not-implemented-hide:] HTTP specific response. // Specifies a list of HTTP expected responses to match in the first ``response_buffer_size`` bytes of the response body.
Payload receive = 4; // If it is set, both the expected response check and status code determine the health check.
// When checking the response, fuzzy matching is performed such that each payload block must be found,
// and in the order specified, but not necessarily contiguous.
//
// .. note::
//
// It is recommended to set ``response_buffer_size`` based on the total Payload size for efficiency.
// The default buffer size is 1024 bytes when it is not set.
repeated Payload receive = 4;
// Specifies the size of response buffer in bytes that is used to Payload match.
// The default value is 1024. Setting to 0 implies that the Payload will be matched against the entire response.
google.protobuf.UInt64Value response_buffer_size = 14 [(validate.rules).uint64 = {gte: 0}];
// Specifies a list of HTTP headers that should be added to each request that is sent to the // 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 // health checked cluster. For more information, including details on header value syntax, see
@ -161,7 +173,7 @@ message HealthCheck {
Payload send = 1; Payload send = 1;
// When checking the response, fuzzy matching is performed such that each // When checking the response, fuzzy matching is performed such that each
// binary block must be found, and in the order specified, but not // payload block must be found, and in the order specified, but not
// necessarily contiguous. // necessarily contiguous.
repeated Payload receive = 2; repeated Payload receive = 2;
} }

Loading…
Cancel
Save