cds: add ring_hash_lb config (#202)

Signed-off-by: Daniel Hochman <danielhochman@users.noreply.github.com>
pull/189/merge
Daniel Hochman 7 years ago committed by htuch
parent d498884402
commit 5b29f002b4
  1. 31
      api/cds.proto

@ -127,15 +127,15 @@ message Cluster {
oneof protocol_options { oneof protocol_options {
TcpProtocolOptions tcp_protocol_options = 12; TcpProtocolOptions tcp_protocol_options = 12;
Http1ProtocolOptions http_protocol_options = 13; Http1ProtocolOptions http_protocol_options = 13;
// Even if default HTTP2 protocol options are desired, this field must be // Even if default HTTP2 protocol options are desired, this field must be
// set so that Envoy will assume that the upstream supports HTTP/2 when // set so that Envoy will assume that the upstream supports HTTP/2 when
// making new HTTP connection pool connections. Currently, Envoy only // making new HTTP connection pool connections. Currently, Envoy only
// supports prior knowledge for upstream connections. Even if TLS is used // supports prior knowledge for upstream connections. Even if TLS is used
// with ALPN, http2 must be specified. As an aside this allows HTTP/2 // with ALPN, http2 must be specified. As an aside this allows HTTP/2
// connections to happen over plain text. // connections to happen over plain text.
Http2ProtocolOptions http2_protocol_options = 14; Http2ProtocolOptions http2_protocol_options = 14;
GrpcProtocolOptions grpc_protocol_options = 15; GrpcProtocolOptions grpc_protocol_options = 15;
} }
// If the dns refresh rate is specified and the cluster type is either // If the dns refresh rate is specified and the cluster type is either
@ -272,4 +272,29 @@ message Cluster {
repeated LbSubsetSelector subset_selectors = 3; repeated LbSubsetSelector subset_selectors = 3;
} }
LbSubsetConfig lb_subset_config = 22; LbSubsetConfig lb_subset_config = 22;
message RingHashLbConfig {
// Minimum hash ring size, i.e. total virtual nodes. A larger size
// will provide better request distribution since each host in the
// cluster will have more virtual nodes. Defaults to 1024. In the case
// that total number of hosts is greater than the minimum, each host will
// be allocated a single virtual node.
google.protobuf.UInt64Value minimum_ring_size = 1;
message DeprecatedV1 {
// Envoy uses xxHash by default in v2. Previously std::hash was used
// which can vary based on platform. This field exists for migration
// purposes.
google.protobuf.BoolValue use_std_hash = 1;
}
DeprecatedV1 deprecated_v1 = 2;
}
// Optional configuration for the load balancing algorithm selected by
// LbPolicy. Currently only RING_HASH has additional configuration options.
// Specifying ring_hash_lb_config without setting the LbPolicy to RING_HASH
// will generate an error at runtime.
oneof lb_config {
RingHashLbConfig ring_hash_lb_config = 23;
}
} }

Loading…
Cancel
Save