diff --git a/api/cds.proto b/api/cds.proto index bb648012..6365fe48 100644 --- a/api/cds.proto +++ b/api/cds.proto @@ -127,15 +127,15 @@ message Cluster { oneof protocol_options { 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 // set so that Envoy will assume that the upstream supports HTTP/2 when // making new HTTP connection pool connections. Currently, Envoy only // supports prior knowledge for upstream connections. Even if TLS is used // with ALPN, http2 must be specified. As an aside this allows HTTP/2 // connections to happen over plain text. - Http2ProtocolOptions http2_protocol_options = 14; - GrpcProtocolOptions grpc_protocol_options = 15; + Http2ProtocolOptions http2_protocol_options = 14; + GrpcProtocolOptions grpc_protocol_options = 15; } // If the dns refresh rate is specified and the cluster type is either @@ -272,4 +272,29 @@ message Cluster { repeated LbSubsetSelector subset_selectors = 3; } 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; + } }