From aac1d4b4474f1a71adc531016877b02383c31281 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Thu, 5 Mar 2026 18:20:14 -0800 Subject: [PATCH 01/11] Add AdaptiveConcurrency to DestinationRule TrafficPolicy Adds AdaptiveConcurrency message to the DestinationRule proto, enabling configuration of Envoy's adaptive concurrency filter via TrafficPolicy. The message structure mirrors Envoy's v3 AdaptiveConcurrency proto with GradientControllerConfig, ConcurrencyLimitCalculationParams, and MinimumRTTCalculationParams. Field names and numbers are aligned with the upstream Envoy proto. --- kubernetes/customresourcedefinitions.gen.yaml | 624 +++++++++++++++++ networking/v1/destination_rule_alias.gen.go | 55 ++ networking/v1alpha3/destination_rule.pb.go | 655 ++++++++++++++---- networking/v1alpha3/destination_rule.pb.html | 251 ++++++- networking/v1alpha3/destination_rule.proto | 114 +++ .../v1alpha3/destination_rule_deepcopy.gen.go | 84 +++ .../v1alpha3/destination_rule_json.gen.go | 44 ++ .../v1beta1/destination_rule_alias.gen.go | 55 ++ ...ptive-concurrency-to-destination-rule.yaml | 11 + 9 files changed, 1768 insertions(+), 125 deletions(-) create mode 100644 releasenotes/notes/add-adaptive-concurrency-to-destination-rule.yaml diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index dea2de3fcc..411bf7652f 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -432,6 +432,113 @@ spec: trafficPolicy: description: Traffic policies that apply to this subset. properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically + adjusting the allowed number of outstanding requests based + on sampled latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the + downstream client when the concurrency limit has been + exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency + filter will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation + of the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are + taken to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the + calculated concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT + to add stability to the concurrency limit + during natural variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will + be introduced to the start of the minRTT calculation + window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while + measuring the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing + aggregated samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: @@ -1375,6 +1482,107 @@ spec: description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically adjusting + the allowed number of outstanding requests based on sampled + latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the downstream + client when the concurrency limit has been exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency filter + will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation of + the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are taken + to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the calculated + concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT to + add stability to the concurrency limit during natural + variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be introduced + to the start of the minRTT calculation window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while measuring + the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing aggregated + samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: @@ -2433,6 +2641,113 @@ spec: trafficPolicy: description: Traffic policies that apply to this subset. properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically + adjusting the allowed number of outstanding requests based + on sampled latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the + downstream client when the concurrency limit has been + exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency + filter will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation + of the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are + taken to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the + calculated concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT + to add stability to the concurrency limit + during natural variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will + be introduced to the start of the minRTT calculation + window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while + measuring the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing + aggregated samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: @@ -3376,6 +3691,107 @@ spec: description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically adjusting + the allowed number of outstanding requests based on sampled + latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the downstream + client when the concurrency limit has been exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency filter + will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation of + the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are taken + to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the calculated + concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT to + add stability to the concurrency limit during natural + variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be introduced + to the start of the minRTT calculation window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while measuring + the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing aggregated + samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: @@ -4434,6 +4850,113 @@ spec: trafficPolicy: description: Traffic policies that apply to this subset. properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically + adjusting the allowed number of outstanding requests based + on sampled latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the + downstream client when the concurrency limit has been + exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency + filter will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation + of the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are + taken to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the + calculated concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT + to add stability to the concurrency limit + during natural variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will + be introduced to the start of the minRTT calculation + window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while + measuring the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing + aggregated samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: @@ -5377,6 +5900,107 @@ spec: description: Traffic policies to apply (load balancing policy, connection pool sizes, outlier detection). properties: + adaptiveConcurrency: + description: Adaptive concurrency settings for dynamically adjusting + the allowed number of outstanding requests based on sampled + latencies. + oneOf: + - not: + anyOf: + - required: + - gradientControllerConfig + - required: + - gradientControllerConfig + properties: + concurrencyLimitExceededStatus: + description: Custom HTTP response status code to the downstream + client when the concurrency limit has been exceeded. + maximum: 4294967295 + minimum: 0 + type: integer + enabled: + description: If set to false, the adaptive concurrency filter + will operate as a pass-through filter. + type: boolean + gradientControllerConfig: + description: Gradient concurrency control will be used. + properties: + concurrencyLimitParams: + description: Parameters for periodic recalculation of + the concurrency limit. + properties: + concurrencyUpdateInterval: + description: The period of time samples are taken + to recalculate the concurrency limit. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + maxConcurrencyLimit: + description: The allowed upper-bound on the calculated + concurrency limit. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + required: + - concurrencyUpdateInterval + type: object + minRttCalcParams: + description: Parameters for periodic minRTT recalculation. + properties: + buffer: + description: Amount added to the measured minRTT to + add stability to the concurrency limit during natural + variability in latency. + format: double + nullable: true + type: number + fixedValue: + description: The fixed value for the minRTT. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be introduced + to the start of the minRTT calculation window. + format: double + nullable: true + type: number + minConcurrency: + description: The concurrency limit set while measuring + the minRTT. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + sampleAggregatePercentile: + description: The percentile to use when summarizing aggregated + samples. + format: double + nullable: true + type: number + required: + - concurrencyLimitParams + - minRttCalcParams + type: object + type: object connectionPool: properties: http: diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 76c48e73fd..655beb2875 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -318,6 +318,61 @@ const ConnectionPoolSettings_HTTPSettings_UPGRADE ConnectionPoolSettings_HTTPSet // ``` type OutlierDetection = v1alpha3.OutlierDetection +// Adaptive concurrency settings for dynamically adjusting the allowed number of +// outstanding requests based on sampled latencies. See Envoy's +// [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) +// for more details. +// +// The following example configures adaptive concurrency for the my-service +// service with a gradient controller: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: my-service-adaptive +// +// spec: +// +// host: my-service.default.svc.cluster.local +// trafficPolicy: +// adaptiveConcurrency: +// enabled: true +// gradientControllerConfig: +// sampleAggregatePercentile: 50 +// concurrencyLimitParams: +// maxConcurrencyLimit: 1000 +// concurrencyUpdateInterval: 100ms +// minRttCalcParams: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 +// buffer: 25 +// concurrencyLimitExceededStatus: 503 +// +// ``` +type AdaptiveConcurrency = v1alpha3.AdaptiveConcurrency + +// Configuration parameters for the gradient concurrency controller. +// The gradient controller makes forwarding decisions based on a periodically +// measured ideal round-trip time (minRTT) for an upstream. +type AdaptiveConcurrency_GradientControllerConfig = v1alpha3.AdaptiveConcurrency_GradientControllerConfig + +// Parameters controlling the periodic recalculation of the concurrency limit +// from sampled request latencies. +type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams + +// Parameters controlling the periodic minRTT recalculation. +// The minRTT is periodically measured by allowing only a very low outstanding +// request count to an upstream cluster and measuring the latency under +// these ideal conditions. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams + +// Gradient concurrency control will be used. +type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ + // SSL/TLS related settings for upstream connections. See Envoy's [TLS // context](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto.html#common-tls-configuration) // for more details. These settings are common to both HTTP and TCP upstreams. diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index c2a1474e78..76437450a9 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -384,7 +384,7 @@ func (x ClientTLSSettings_TLSmode) Number() protoreflect.EnumNumber { // Deprecated: Use ClientTLSSettings_TLSmode.Descriptor instead. func (ClientTLSSettings_TLSmode) EnumDescriptor() ([]byte, []int) { - return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0} + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{8, 0} } // DestinationRule defines policies that apply to traffic intended for a service @@ -556,9 +556,13 @@ type TrafficPolicy struct { // The upstream PROXY protocol settings. ProxyProtocol *TrafficPolicy_ProxyProtocol `protobuf:"bytes,7,opt,name=proxy_protocol,json=proxyProtocol,proto3" json:"proxy_protocol,omitempty"` // Specifies a limit on concurrent retries in relation to the number of active requests. - RetryBudget *TrafficPolicy_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + RetryBudget *TrafficPolicy_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"` + // Adaptive concurrency settings for dynamically adjusting the allowed number of + // outstanding requests based on sampled latencies. This enables the Envoy + // adaptive concurrency filter for the destination. + AdaptiveConcurrency *AdaptiveConcurrency `protobuf:"bytes,9,opt,name=adaptive_concurrency,json=adaptiveConcurrency,proto3" json:"adaptive_concurrency,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TrafficPolicy) Reset() { @@ -647,6 +651,13 @@ func (x *TrafficPolicy) GetRetryBudget() *TrafficPolicy_RetryBudget { return nil } +func (x *TrafficPolicy) GetAdaptiveConcurrency() *AdaptiveConcurrency { + if x != nil { + return x.AdaptiveConcurrency + } + return nil +} + // A subset of endpoints of a service. Subsets can be used for scenarios // like A/B testing, or routing to a specific version of a service. Refer // to [VirtualService](https://istio.io/docs/reference/config/networking/virtual-service/#VirtualService) documentation for examples of using @@ -1280,6 +1291,131 @@ func (x *OutlierDetection) GetMinHealthPercent() int32 { return 0 } +// Adaptive concurrency settings for dynamically adjusting the allowed number of +// outstanding requests based on sampled latencies. See Envoy's +// [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) +// for more details. +// +// The following example configures adaptive concurrency for the my-service +// service with a gradient controller: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: my-service-adaptive +// +// spec: +// +// host: my-service.default.svc.cluster.local +// trafficPolicy: +// adaptiveConcurrency: +// enabled: true +// gradientControllerConfig: +// sampleAggregatePercentile: 50 +// concurrencyLimitParams: +// maxConcurrencyLimit: 1000 +// concurrencyUpdateInterval: 100ms +// minRttCalcParams: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 +// buffer: 25 +// concurrencyLimitExceededStatus: 503 +// +// ``` +type AdaptiveConcurrency struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to ConcurrencyControllerConfig: + // + // *AdaptiveConcurrency_GradientControllerConfig_ + ConcurrencyControllerConfig isAdaptiveConcurrency_ConcurrencyControllerConfig `protobuf_oneof:"concurrency_controller_config"` + // If set to false, the adaptive concurrency filter will operate as a pass-through + // filter. If unspecified, the filter will be enabled. + Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` + // Custom HTTP response status code to the downstream client when + // the concurrency limit has been exceeded. + // Defaults to 503 (Service Unavailable). + // Note: If this is set to < 400, 503 will be used instead. + ConcurrencyLimitExceededStatus uint32 `protobuf:"varint,3,opt,name=concurrency_limit_exceeded_status,json=concurrencyLimitExceededStatus,proto3" json:"concurrency_limit_exceeded_status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdaptiveConcurrency) Reset() { + *x = AdaptiveConcurrency{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdaptiveConcurrency) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency) ProtoMessage() {} + +func (x *AdaptiveConcurrency) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7} +} + +func (x *AdaptiveConcurrency) GetConcurrencyControllerConfig() isAdaptiveConcurrency_ConcurrencyControllerConfig { + if x != nil { + return x.ConcurrencyControllerConfig + } + return nil +} + +func (x *AdaptiveConcurrency) GetGradientControllerConfig() *AdaptiveConcurrency_GradientControllerConfig { + if x != nil { + if x, ok := x.ConcurrencyControllerConfig.(*AdaptiveConcurrency_GradientControllerConfig_); ok { + return x.GradientControllerConfig + } + } + return nil +} + +func (x *AdaptiveConcurrency) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *AdaptiveConcurrency) GetConcurrencyLimitExceededStatus() uint32 { + if x != nil { + return x.ConcurrencyLimitExceededStatus + } + return 0 +} + +type isAdaptiveConcurrency_ConcurrencyControllerConfig interface { + isAdaptiveConcurrency_ConcurrencyControllerConfig() +} + +type AdaptiveConcurrency_GradientControllerConfig_ struct { + // Gradient concurrency control will be used. + GradientControllerConfig *AdaptiveConcurrency_GradientControllerConfig `protobuf:"bytes,1,opt,name=gradient_controller_config,json=gradientControllerConfig,proto3,oneof"` +} + +func (*AdaptiveConcurrency_GradientControllerConfig_) isAdaptiveConcurrency_ConcurrencyControllerConfig() { +} + // SSL/TLS related settings for upstream connections. See Envoy's [TLS // context](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto.html#common-tls-configuration) // for more details. These settings are common to both HTTP and TCP upstreams. @@ -1411,7 +1547,7 @@ type ClientTLSSettings struct { func (x *ClientTLSSettings) Reset() { *x = ClientTLSSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[7] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1423,7 +1559,7 @@ func (x *ClientTLSSettings) String() string { func (*ClientTLSSettings) ProtoMessage() {} func (x *ClientTLSSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[7] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,7 +1572,7 @@ func (x *ClientTLSSettings) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientTLSSettings.ProtoReflect.Descriptor instead. func (*ClientTLSSettings) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7} + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{8} } func (x *ClientTLSSettings) GetMode() ClientTLSSettings_TLSmode { @@ -1635,7 +1771,7 @@ type LocalityLoadBalancerSetting struct { func (x *LocalityLoadBalancerSetting) Reset() { *x = LocalityLoadBalancerSetting{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[8] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1647,7 +1783,7 @@ func (x *LocalityLoadBalancerSetting) String() string { func (*LocalityLoadBalancerSetting) ProtoMessage() {} func (x *LocalityLoadBalancerSetting) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[8] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1660,7 +1796,7 @@ func (x *LocalityLoadBalancerSetting) ProtoReflect() protoreflect.Message { // Deprecated: Use LocalityLoadBalancerSetting.ProtoReflect.Descriptor instead. func (*LocalityLoadBalancerSetting) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{8} + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{9} } func (x *LocalityLoadBalancerSetting) GetDistribute() []*LocalityLoadBalancerSetting_Distribute { @@ -1711,7 +1847,7 @@ type TrafficPolicy_PortTrafficPolicy struct { func (x *TrafficPolicy_PortTrafficPolicy) Reset() { *x = TrafficPolicy_PortTrafficPolicy{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[9] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1723,7 +1859,7 @@ func (x *TrafficPolicy_PortTrafficPolicy) String() string { func (*TrafficPolicy_PortTrafficPolicy) ProtoMessage() {} func (x *TrafficPolicy_PortTrafficPolicy) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[9] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1796,7 +1932,7 @@ type TrafficPolicy_TunnelSettings struct { func (x *TrafficPolicy_TunnelSettings) Reset() { *x = TrafficPolicy_TunnelSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[10] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1808,7 +1944,7 @@ func (x *TrafficPolicy_TunnelSettings) String() string { func (*TrafficPolicy_TunnelSettings) ProtoMessage() {} func (x *TrafficPolicy_TunnelSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[10] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1856,7 +1992,7 @@ type TrafficPolicy_ProxyProtocol struct { func (x *TrafficPolicy_ProxyProtocol) Reset() { *x = TrafficPolicy_ProxyProtocol{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[11] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1868,7 +2004,7 @@ func (x *TrafficPolicy_ProxyProtocol) String() string { func (*TrafficPolicy_ProxyProtocol) ProtoMessage() {} func (x *TrafficPolicy_ProxyProtocol) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[11] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1914,7 +2050,7 @@ type TrafficPolicy_RetryBudget struct { func (x *TrafficPolicy_RetryBudget) Reset() { *x = TrafficPolicy_RetryBudget{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[12] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1926,7 +2062,7 @@ func (x *TrafficPolicy_RetryBudget) String() string { func (*TrafficPolicy_RetryBudget) ProtoMessage() {} func (x *TrafficPolicy_RetryBudget) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[12] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2004,7 +2140,7 @@ type LoadBalancerSettings_ConsistentHashLB struct { func (x *LoadBalancerSettings_ConsistentHashLB) Reset() { *x = LoadBalancerSettings_ConsistentHashLB{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2016,7 +2152,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB) String() string { func (*LoadBalancerSettings_ConsistentHashLB) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[14] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2179,7 +2315,7 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash struct { func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_RingHash{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2191,7 +2327,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) String() string { func (*LoadBalancerSettings_ConsistentHashLB_RingHash) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[15] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2228,7 +2364,7 @@ type LoadBalancerSettings_ConsistentHashLB_MagLev struct { func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_MagLev{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2240,7 +2376,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) String() string { func (*LoadBalancerSettings_ConsistentHashLB_MagLev) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2284,7 +2420,7 @@ type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_HTTPCookie{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2296,7 +2432,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) String() string { func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2353,7 +2489,7 @@ type LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute struct { func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2365,7 +2501,7 @@ func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) String() st func (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) ProtoMessage() {} func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2425,7 +2561,7 @@ type ConnectionPoolSettings_TCPSettings struct { func (x *ConnectionPoolSettings_TCPSettings) Reset() { *x = ConnectionPoolSettings_TCPSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2437,7 +2573,7 @@ func (x *ConnectionPoolSettings_TCPSettings) String() string { func (*ConnectionPoolSettings_TCPSettings) ProtoMessage() {} func (x *ConnectionPoolSettings_TCPSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2530,7 +2666,7 @@ type ConnectionPoolSettings_HTTPSettings struct { func (x *ConnectionPoolSettings_HTTPSettings) Reset() { *x = ConnectionPoolSettings_HTTPSettings{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2542,7 +2678,7 @@ func (x *ConnectionPoolSettings_HTTPSettings) String() string { func (*ConnectionPoolSettings_HTTPSettings) ProtoMessage() {} func (x *ConnectionPoolSettings_HTTPSettings) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2635,7 +2771,7 @@ type ConnectionPoolSettings_TCPSettings_TcpKeepalive struct { func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Reset() { *x = ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2647,7 +2783,7 @@ func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) String() string { func (*ConnectionPoolSettings_TCPSettings_TcpKeepalive) ProtoMessage() {} func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2684,6 +2820,235 @@ func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) GetInterval() *duratio return nil } +// Configuration parameters for the gradient concurrency controller. +// The gradient controller makes forwarding decisions based on a periodically +// measured ideal round-trip time (minRTT) for an upstream. +type AdaptiveConcurrency_GradientControllerConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The percentile to use when summarizing aggregated samples. Defaults to p50. + // Value should be between 0 and 100. + SampleAggregatePercentile *wrappers.DoubleValue `protobuf:"bytes,1,opt,name=sample_aggregate_percentile,json=sampleAggregatePercentile,proto3" json:"sample_aggregate_percentile,omitempty"` + // Parameters for periodic recalculation of the concurrency limit. + ConcurrencyLimitParams *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams `protobuf:"bytes,2,opt,name=concurrency_limit_params,json=concurrencyLimitParams,proto3" json:"concurrency_limit_params,omitempty"` + // Parameters for periodic minRTT recalculation. + MinRttCalcParams *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams `protobuf:"bytes,3,opt,name=min_rtt_calc_params,json=minRttCalcParams,proto3" json:"min_rtt_calc_params,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdaptiveConcurrency_GradientControllerConfig) Reset() { + *x = AdaptiveConcurrency_GradientControllerConfig{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdaptiveConcurrency_GradientControllerConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency_GradientControllerConfig) ProtoMessage() {} + +func (x *AdaptiveConcurrency_GradientControllerConfig) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency_GradientControllerConfig.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency_GradientControllerConfig) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0} +} + +func (x *AdaptiveConcurrency_GradientControllerConfig) GetSampleAggregatePercentile() *wrappers.DoubleValue { + if x != nil { + return x.SampleAggregatePercentile + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig) GetConcurrencyLimitParams() *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams { + if x != nil { + return x.ConcurrencyLimitParams + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig) GetMinRttCalcParams() *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams { + if x != nil { + return x.MinRttCalcParams + } + return nil +} + +// Parameters controlling the periodic recalculation of the concurrency limit +// from sampled request latencies. +type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. + MaxConcurrencyLimit *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrency_limit,json=maxConcurrencyLimit,proto3" json:"max_concurrency_limit,omitempty"` + // The period of time samples are taken to recalculate the concurrency limit. + // This is required. + ConcurrencyUpdateInterval *duration.Duration `protobuf:"bytes,3,opt,name=concurrency_update_interval,json=concurrencyUpdateInterval,proto3" json:"concurrency_update_interval,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) Reset() { + *x = AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) ProtoMessage() { +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0, 0} +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) GetMaxConcurrencyLimit() *wrappers.UInt32Value { + if x != nil { + return x.MaxConcurrencyLimit + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) GetConcurrencyUpdateInterval() *duration.Duration { + if x != nil { + return x.ConcurrencyUpdateInterval + } + return nil +} + +// Parameters controlling the periodic minRTT recalculation. +// The minRTT is periodically measured by allowing only a very low outstanding +// request count to an upstream cluster and measuring the latency under +// these ideal conditions. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The time interval between recalculating the minimum request round-trip time. + // Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled. + Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + // The fixed value for the minRTT. This value is used when minRTT is not sampled + // dynamically. If dynamic sampling of the minRTT is disabled (i.e. `interval` is + // set to zero), this field must be set. + FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3" json:"fixed_value,omitempty"` + // The number of requests to aggregate/sample during the minRTT recalculation + // window before updating. Defaults to 50. + RequestCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` + // Randomized time delta that will be introduced to the start of the minRTT + // calculation window. This is represented as a percentage of the interval duration. + // Defaults to 15%. This is recommended to prevent all hosts in a cluster from + // being in a minRTT calculation window at the same time. + Jitter *wrappers.DoubleValue `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` + // The concurrency limit set while measuring the minRTT. Defaults to 3. + MinConcurrency *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` + // Amount added to the measured minRTT to add stability to the concurrency limit + // during natural variability in latency. This is expressed as a percentage of the + // measured value and can be adjusted to allow more or less tolerance to the sampled + // latency values. Defaults to 25%. + Buffer *wrappers.DoubleValue `protobuf:"bytes,5,opt,name=buffer,proto3" json:"buffer,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) Reset() { + *x = AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) ProtoMessage() {} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0, 1} +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetInterval() *duration.Duration { + if x != nil { + return x.Interval + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetFixedValue() *duration.Duration { + if x != nil { + return x.FixedValue + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetRequestCount() *wrappers.UInt32Value { + if x != nil { + return x.RequestCount + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetJitter() *wrappers.DoubleValue { + if x != nil { + return x.Jitter + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetMinConcurrency() *wrappers.UInt32Value { + if x != nil { + return x.MinConcurrency + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetBuffer() *wrappers.DoubleValue { + if x != nil { + return x.Buffer + } + return nil +} + // Describes how traffic originating in the 'from' zone or sub-zone is // distributed over a set of 'to' zones. Syntax for specifying a zone is // {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any @@ -2708,7 +3073,7 @@ type LocalityLoadBalancerSetting_Distribute struct { func (x *LocalityLoadBalancerSetting_Distribute) Reset() { *x = LocalityLoadBalancerSetting_Distribute{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2720,7 +3085,7 @@ func (x *LocalityLoadBalancerSetting_Distribute) String() string { func (*LocalityLoadBalancerSetting_Distribute) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Distribute) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2733,7 +3098,7 @@ func (x *LocalityLoadBalancerSetting_Distribute) ProtoReflect() protoreflect.Mes // Deprecated: Use LocalityLoadBalancerSetting_Distribute.ProtoReflect.Descriptor instead. func (*LocalityLoadBalancerSetting_Distribute) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{8, 0} + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{9, 0} } func (x *LocalityLoadBalancerSetting_Distribute) GetFrom() string { @@ -2770,7 +3135,7 @@ type LocalityLoadBalancerSetting_Failover struct { func (x *LocalityLoadBalancerSetting_Failover) Reset() { *x = LocalityLoadBalancerSetting_Failover{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2782,7 +3147,7 @@ func (x *LocalityLoadBalancerSetting_Failover) String() string { func (*LocalityLoadBalancerSetting_Failover) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Failover) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2795,7 +3160,7 @@ func (x *LocalityLoadBalancerSetting_Failover) ProtoReflect() protoreflect.Messa // Deprecated: Use LocalityLoadBalancerSetting_Failover.ProtoReflect.Descriptor instead. func (*LocalityLoadBalancerSetting_Failover) Descriptor() ([]byte, []int) { - return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{8, 1} + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{9, 1} } func (x *LocalityLoadBalancerSetting_Failover) GetFrom() string { @@ -2822,7 +3187,7 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x0etraffic_policy\x18\x02 \x01(\v2(.istio.networking.v1alpha3.TrafficPolicyR\rtrafficPolicy\x12;\n" + "\asubsets\x18\x03 \x03(\v2!.istio.networking.v1alpha3.SubsetR\asubsets\x12\x1b\n" + "\texport_to\x18\x04 \x03(\tR\bexportTo\x12Q\n" + - "\x11workload_selector\x18\x05 \x01(\v2$.istio.type.v1beta1.WorkloadSelectorR\x10workloadSelector\"\xed\v\n" + + "\x11workload_selector\x18\x05 \x01(\v2$.istio.type.v1beta1.WorkloadSelectorR\x10workloadSelector\"\xd0\f\n" + "\rTrafficPolicy\x12T\n" + "\rload_balancer\x18\x01 \x01(\v2/.istio.networking.v1alpha3.LoadBalancerSettingsR\floadBalancer\x12Z\n" + "\x0fconnection_pool\x18\x02 \x01(\v21.istio.networking.v1alpha3.ConnectionPoolSettingsR\x0econnectionPool\x12X\n" + @@ -2831,7 +3196,8 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x13port_level_settings\x18\x05 \x03(\v2:.istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicyR\x11portLevelSettings\x12O\n" + "\x06tunnel\x18\x06 \x01(\v27.istio.networking.v1alpha3.TrafficPolicy.TunnelSettingsR\x06tunnel\x12]\n" + "\x0eproxy_protocol\x18\a \x01(\v26.istio.networking.v1alpha3.TrafficPolicy.ProxyProtocolR\rproxyProtocol\x12W\n" + - "\fretry_budget\x18\b \x01(\v24.istio.networking.v1alpha3.TrafficPolicy.RetryBudgetR\vretryBudget\x1a\x9c\x03\n" + + "\fretry_budget\x18\b \x01(\v24.istio.networking.v1alpha3.TrafficPolicy.RetryBudgetR\vretryBudget\x12a\n" + + "\x14adaptive_concurrency\x18\t \x01(\v2..istio.networking.v1alpha3.AdaptiveConcurrencyR\x13adaptiveConcurrency\x1a\x9c\x03\n" + "\x11PortTrafficPolicy\x12;\n" + "\x04port\x18\x01 \x01(\v2'.istio.networking.v1alpha3.PortSelectorR\x04port\x12T\n" + "\rload_balancer\x18\x02 \x01(\v2/.istio.networking.v1alpha3.LoadBalancerSettingsR\floadBalancer\x12Z\n" + @@ -2946,7 +3312,28 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12G\n" + "\x12base_ejection_time\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x10baseEjectionTime\x120\n" + "\x14max_ejection_percent\x18\x04 \x01(\x05R\x12maxEjectionPercent\x12,\n" + - "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xe4\x03\n" + + "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xc9\n" + + "\n" + + "\x13AdaptiveConcurrency\x12\x87\x01\n" + + "\x1agradient_controller_config\x18\x01 \x01(\v2G.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfigH\x00R\x18gradientControllerConfig\x12\x18\n" + + "\aenabled\x18\x02 \x01(\bR\aenabled\x12I\n" + + "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xa1\b\n" + + "\x18GradientControllerConfig\x12\\\n" + + "\x1bsample_aggregate_percentile\x18\x01 \x01(\v2\x1c.google.protobuf.DoubleValueR\x19sampleAggregatePercentile\x12\xa9\x01\n" + + "\x18concurrency_limit_params\x18\x02 \x01(\v2i.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParamsB\x04\xe2A\x01\x02R\x16concurrencyLimitParams\x12\x98\x01\n" + + "\x13min_rtt_calc_params\x18\x03 \x01(\v2c.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParamsB\x04\xe2A\x01\x02R\x10minRttCalcParams\x1a\xd6\x01\n" + + "!ConcurrencyLimitCalculationParams\x12P\n" + + "\x15max_concurrency_limit\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13maxConcurrencyLimit\x12_\n" + + "\x1bconcurrency_update_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x04\xe2A\x01\x02R\x19concurrencyUpdateInterval\x1a\x86\x03\n" + + "\x1bMinimumRTTCalculationParams\x125\n" + + "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12:\n" + + "\vfixed_value\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\n" + + "fixedValue\x12A\n" + + "\rrequest_count\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\frequestCount\x124\n" + + "\x06jitter\x18\x03 \x01(\v2\x1c.google.protobuf.DoubleValueR\x06jitter\x12E\n" + + "\x0fmin_concurrency\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0eminConcurrency\x124\n" + + "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.DoubleValueR\x06bufferB\x1f\n" + + "\x1dconcurrency_controller_config\"\xe4\x03\n" + "\x11ClientTLSSettings\x12H\n" + "\x04mode\x18\x01 \x01(\x0e24.istio.networking.v1alpha3.ClientTLSSettings.TLSmodeR\x04mode\x12-\n" + "\x12client_certificate\x18\x02 \x01(\tR\x11clientCertificate\x12\x1f\n" + @@ -2996,7 +3383,7 @@ func file_networking_v1alpha3_destination_rule_proto_rawDescGZIP() []byte { } var file_networking_v1alpha3_destination_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 25) +var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (TrafficPolicy_ProxyProtocol_VERSION)(0), // 0: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION (LoadBalancerSettings_SimpleLB)(0), // 1: istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB @@ -3009,91 +3396,108 @@ var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (*WarmupConfiguration)(nil), // 8: istio.networking.v1alpha3.WarmupConfiguration (*ConnectionPoolSettings)(nil), // 9: istio.networking.v1alpha3.ConnectionPoolSettings (*OutlierDetection)(nil), // 10: istio.networking.v1alpha3.OutlierDetection - (*ClientTLSSettings)(nil), // 11: istio.networking.v1alpha3.ClientTLSSettings - (*LocalityLoadBalancerSetting)(nil), // 12: istio.networking.v1alpha3.LocalityLoadBalancerSetting - (*TrafficPolicy_PortTrafficPolicy)(nil), // 13: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy - (*TrafficPolicy_TunnelSettings)(nil), // 14: istio.networking.v1alpha3.TrafficPolicy.TunnelSettings - (*TrafficPolicy_ProxyProtocol)(nil), // 15: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol - (*TrafficPolicy_RetryBudget)(nil), // 16: istio.networking.v1alpha3.TrafficPolicy.RetryBudget - nil, // 17: istio.networking.v1alpha3.Subset.LabelsEntry - (*LoadBalancerSettings_ConsistentHashLB)(nil), // 18: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB - (*LoadBalancerSettings_ConsistentHashLB_RingHash)(nil), // 19: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash - (*LoadBalancerSettings_ConsistentHashLB_MagLev)(nil), // 20: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), // 21: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie - (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute)(nil), // 22: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute - (*ConnectionPoolSettings_TCPSettings)(nil), // 23: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings - (*ConnectionPoolSettings_HTTPSettings)(nil), // 24: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings - (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 25: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - (*LocalityLoadBalancerSetting_Distribute)(nil), // 26: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - (*LocalityLoadBalancerSetting_Failover)(nil), // 27: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - nil, // 28: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - (*v1beta1.WorkloadSelector)(nil), // 29: istio.type.v1beta1.WorkloadSelector - (*duration.Duration)(nil), // 30: google.protobuf.Duration - (*wrappers.DoubleValue)(nil), // 31: google.protobuf.DoubleValue - (*wrappers.UInt32Value)(nil), // 32: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 33: google.protobuf.BoolValue - (*PortSelector)(nil), // 34: istio.networking.v1alpha3.PortSelector + (*AdaptiveConcurrency)(nil), // 11: istio.networking.v1alpha3.AdaptiveConcurrency + (*ClientTLSSettings)(nil), // 12: istio.networking.v1alpha3.ClientTLSSettings + (*LocalityLoadBalancerSetting)(nil), // 13: istio.networking.v1alpha3.LocalityLoadBalancerSetting + (*TrafficPolicy_PortTrafficPolicy)(nil), // 14: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy + (*TrafficPolicy_TunnelSettings)(nil), // 15: istio.networking.v1alpha3.TrafficPolicy.TunnelSettings + (*TrafficPolicy_ProxyProtocol)(nil), // 16: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol + (*TrafficPolicy_RetryBudget)(nil), // 17: istio.networking.v1alpha3.TrafficPolicy.RetryBudget + nil, // 18: istio.networking.v1alpha3.Subset.LabelsEntry + (*LoadBalancerSettings_ConsistentHashLB)(nil), // 19: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB + (*LoadBalancerSettings_ConsistentHashLB_RingHash)(nil), // 20: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + (*LoadBalancerSettings_ConsistentHashLB_MagLev)(nil), // 21: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), // 22: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute)(nil), // 23: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute + (*ConnectionPoolSettings_TCPSettings)(nil), // 24: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + (*ConnectionPoolSettings_HTTPSettings)(nil), // 25: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 26: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + (*AdaptiveConcurrency_GradientControllerConfig)(nil), // 27: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig + (*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams)(nil), // 28: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams)(nil), // 29: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams + (*LocalityLoadBalancerSetting_Distribute)(nil), // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + (*LocalityLoadBalancerSetting_Failover)(nil), // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + nil, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + (*v1beta1.WorkloadSelector)(nil), // 33: istio.type.v1beta1.WorkloadSelector + (*duration.Duration)(nil), // 34: google.protobuf.Duration + (*wrappers.DoubleValue)(nil), // 35: google.protobuf.DoubleValue + (*wrappers.UInt32Value)(nil), // 36: google.protobuf.UInt32Value + (*wrappers.BoolValue)(nil), // 37: google.protobuf.BoolValue + (*PortSelector)(nil), // 38: istio.networking.v1alpha3.PortSelector } var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 5, // 0: istio.networking.v1alpha3.DestinationRule.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy 6, // 1: istio.networking.v1alpha3.DestinationRule.subsets:type_name -> istio.networking.v1alpha3.Subset - 29, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector + 33, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector 7, // 3: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings 9, // 4: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings 10, // 5: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection - 11, // 6: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings - 13, // 7: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy - 14, // 8: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings - 15, // 9: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol - 16, // 10: istio.networking.v1alpha3.TrafficPolicy.retry_budget:type_name -> istio.networking.v1alpha3.TrafficPolicy.RetryBudget - 17, // 11: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry - 5, // 12: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy - 1, // 13: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB - 18, // 14: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB - 12, // 15: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting - 30, // 16: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration - 8, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration - 30, // 18: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration - 31, // 19: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue - 31, // 20: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue - 23, // 21: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings - 24, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings - 32, // 23: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value - 32, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value - 32, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value - 30, // 26: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration - 30, // 27: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 3, // 28: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode - 33, // 29: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue - 26, // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - 27, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - 33, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue - 34, // 33: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector - 7, // 34: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings - 9, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings - 10, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection - 11, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings - 0, // 38: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION - 31, // 39: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue - 21, // 40: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie - 19, // 41: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash - 20, // 42: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - 30, // 43: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration - 22, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute - 30, // 45: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration - 25, // 46: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - 30, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration - 30, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration - 30, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration - 2, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy - 30, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration - 30, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration - 28, // 53: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - 54, // [54:54] is the sub-list for method output_type - 54, // [54:54] is the sub-list for method input_type - 54, // [54:54] is the sub-list for extension type_name - 54, // [54:54] is the sub-list for extension extendee - 0, // [0:54] is the sub-list for field type_name + 12, // 6: istio.networking.v1alpha3.TrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings + 14, // 7: istio.networking.v1alpha3.TrafficPolicy.port_level_settings:type_name -> istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy + 15, // 8: istio.networking.v1alpha3.TrafficPolicy.tunnel:type_name -> istio.networking.v1alpha3.TrafficPolicy.TunnelSettings + 16, // 9: istio.networking.v1alpha3.TrafficPolicy.proxy_protocol:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol + 17, // 10: istio.networking.v1alpha3.TrafficPolicy.retry_budget:type_name -> istio.networking.v1alpha3.TrafficPolicy.RetryBudget + 11, // 11: istio.networking.v1alpha3.TrafficPolicy.adaptive_concurrency:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency + 18, // 12: istio.networking.v1alpha3.Subset.labels:type_name -> istio.networking.v1alpha3.Subset.LabelsEntry + 5, // 13: istio.networking.v1alpha3.Subset.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy + 1, // 14: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB + 19, // 15: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB + 13, // 16: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting + 34, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration + 8, // 18: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration + 34, // 19: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration + 35, // 20: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue + 35, // 21: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue + 24, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + 25, // 23: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + 36, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value + 36, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value + 36, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value + 34, // 27: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration + 34, // 28: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration + 27, // 29: istio.networking.v1alpha3.AdaptiveConcurrency.gradient_controller_config:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig + 3, // 30: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode + 37, // 31: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue + 30, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + 31, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + 37, // 34: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue + 38, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector + 7, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings + 9, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings + 10, // 38: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection + 12, // 39: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings + 0, // 40: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION + 35, // 41: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue + 22, // 42: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + 20, // 43: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + 21, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + 34, // 45: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration + 23, // 46: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute + 34, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration + 26, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + 34, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration + 34, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration + 34, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration + 2, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy + 34, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration + 34, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration + 35, // 55: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.sample_aggregate_percentile:type_name -> google.protobuf.DoubleValue + 28, // 56: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.concurrency_limit_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams + 29, // 57: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.min_rtt_calc_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams + 36, // 58: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.max_concurrency_limit:type_name -> google.protobuf.UInt32Value + 34, // 59: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.concurrency_update_interval:type_name -> google.protobuf.Duration + 34, // 60: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.interval:type_name -> google.protobuf.Duration + 34, // 61: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.fixed_value:type_name -> google.protobuf.Duration + 36, // 62: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.request_count:type_name -> google.protobuf.UInt32Value + 35, // 63: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.jitter:type_name -> google.protobuf.DoubleValue + 36, // 64: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.min_concurrency:type_name -> google.protobuf.UInt32Value + 35, // 65: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> google.protobuf.DoubleValue + 32, // 66: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + 67, // [67:67] is the sub-list for method output_type + 67, // [67:67] is the sub-list for method input_type + 67, // [67:67] is the sub-list for extension type_name + 67, // [67:67] is the sub-list for extension extendee + 0, // [0:67] is the sub-list for field type_name } func init() { file_networking_v1alpha3_destination_rule_proto_init() } @@ -3106,7 +3510,10 @@ func file_networking_v1alpha3_destination_rule_proto_init() { (*LoadBalancerSettings_Simple)(nil), (*LoadBalancerSettings_ConsistentHash)(nil), } - file_networking_v1alpha3_destination_rule_proto_msgTypes[14].OneofWrappers = []any{ + file_networking_v1alpha3_destination_rule_proto_msgTypes[7].OneofWrappers = []any{ + (*AdaptiveConcurrency_GradientControllerConfig_)(nil), + } + file_networking_v1alpha3_destination_rule_proto_msgTypes[15].OneofWrappers = []any{ (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName)(nil), (*LoadBalancerSettings_ConsistentHashLB_HttpCookie)(nil), (*LoadBalancerSettings_ConsistentHashLB_UseSourceIp)(nil), @@ -3120,7 +3527,7 @@ func file_networking_v1alpha3_destination_rule_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_networking_v1alpha3_destination_rule_proto_rawDesc), len(file_networking_v1alpha3_destination_rule_proto_rawDesc)), NumEnums: 4, - NumMessages: 25, + NumMessages: 29, NumExtensions: 0, NumServices: 0, }, diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index d465b81f6a..781f85bc15 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -6,7 +6,7 @@ generator: protoc-gen-docs schema: istio.networking.v1alpha3.DestinationRule aliases: [/docs/reference/config/networking/v1alpha3/destination-rule] -number_of_entries: 28 +number_of_entries: 32 ---

DestinationRule defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration @@ -276,6 +276,17 @@

TrafficPolicy

Specifies a limit on concurrent retries in relation to the number of active requests.

+ + + +
+ +
+ +

Adaptive concurrency settings for dynamically adjusting the allowed number of +outstanding requests based on sampled latencies. This enables the Envoy +adaptive concurrency filter for the destination.

+ @@ -1470,6 +1481,244 @@

OutlierDetection

disabled by setting it to 0%. The default is 0% as it’s not typically applicable in k8s environments with few pods per service.

+ + + + + +

AdaptiveConcurrency

+
+

Adaptive concurrency settings for dynamically adjusting the allowed number of +outstanding requests based on sampled latencies. See Envoy’s +adaptive concurrency filter +for more details.

+

The following example configures adaptive concurrency for the my-service +service with a gradient controller:

+
apiVersion: networking.istio.io/v1
+kind: DestinationRule
+metadata:
+  name: my-service-adaptive
+spec:
+  host: my-service.default.svc.cluster.local
+  trafficPolicy:
+    adaptiveConcurrency:
+      enabled: true
+      gradientControllerConfig:
+        sampleAggregatePercentile: 50
+        concurrencyLimitParams:
+          maxConcurrencyLimit: 1000
+          concurrencyUpdateInterval: 100ms
+        minRttCalcParams:
+          interval: 60s
+          requestCount: 50
+          jitter: 10
+          minConcurrency: 3
+          buffer: 25
+      concurrencyLimitExceededStatus: 503
+
+ + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+

Gradient concurrency control will be used.

+ +
+
bool
+
+

If set to false, the adaptive concurrency filter will operate as a pass-through +filter. If unspecified, the filter will be enabled.

+ +
+

Custom HTTP response status code to the downstream client when +the concurrency limit has been exceeded. +Defaults to 503 (Service Unavailable). +Note: If this is set to < 400, 503 will be used instead.

+ +
+
+

GradientControllerConfig

+
+

Configuration parameters for the gradient concurrency controller. +The gradient controller makes forwarding decisions based on a periodically +measured ideal round-trip time (minRTT) for an upstream.

+ + + + + + + + + + + + + + + + + + + + + + +
FieldDescription
+

The percentile to use when summarizing aggregated samples. Defaults to p50. +Value should be between 0 and 100.

+ +
+

Parameters for periodic recalculation of the concurrency limit.

+ +
+

Parameters for periodic minRTT recalculation.

+ +
+
+

ConcurrencyLimitCalculationParams

+
+

Parameters controlling the periodic recalculation of the concurrency limit +from sampled request latencies.

+ + + + + + + + + + + + + + + + + + +
FieldDescription
+

The allowed upper-bound on the calculated concurrency limit. Defaults to 1000.

+ +
+

The period of time samples are taken to recalculate the concurrency limit. +This is required.

+ +
+
+

MinimumRTTCalculationParams

+
+

Parameters controlling the periodic minRTT recalculation. +The minRTT is periodically measured by allowing only a very low outstanding +request count to an upstream cluster and measuring the latency under +these ideal conditions.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index d2589a87aa..0cf1803aa3 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -307,6 +307,11 @@ message TrafficPolicy { // Specifies a limit on concurrent retries in relation to the number of active requests. RetryBudget retry_budget = 8; + + // Adaptive concurrency settings for dynamically adjusting the allowed number of + // outstanding requests based on sampled latencies. This enables the Envoy + // adaptive concurrency filter for the destination. + AdaptiveConcurrency adaptive_concurrency = 9; } // A subset of endpoints of a service. Subsets can be used for scenarios @@ -817,6 +822,115 @@ message OutlierDetection { int32 min_health_percent = 5; } +// Adaptive concurrency settings for dynamically adjusting the allowed number of +// outstanding requests based on sampled latencies. See Envoy's +// [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) +// for more details. +// +// The following example configures adaptive concurrency for the my-service +// service with a gradient controller: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// name: my-service-adaptive +// spec: +// host: my-service.default.svc.cluster.local +// trafficPolicy: +// adaptiveConcurrency: +// enabled: true +// gradientControllerConfig: +// sampleAggregatePercentile: 50 +// concurrencyLimitParams: +// maxConcurrencyLimit: 1000 +// concurrencyUpdateInterval: 100ms +// minRttCalcParams: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 +// buffer: 25 +// concurrencyLimitExceededStatus: 503 +// ``` +// +message AdaptiveConcurrency { + // Configuration parameters for the gradient concurrency controller. + // The gradient controller makes forwarding decisions based on a periodically + // measured ideal round-trip time (minRTT) for an upstream. + message GradientControllerConfig { + // Parameters controlling the periodic recalculation of the concurrency limit + // from sampled request latencies. + message ConcurrencyLimitCalculationParams { + // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. + google.protobuf.UInt32Value max_concurrency_limit = 2; + + // The period of time samples are taken to recalculate the concurrency limit. + // This is required. + google.protobuf.Duration concurrency_update_interval = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Parameters controlling the periodic minRTT recalculation. + // The minRTT is periodically measured by allowing only a very low outstanding + // request count to an upstream cluster and measuring the latency under + // these ideal conditions. + message MinimumRTTCalculationParams { + // The time interval between recalculating the minimum request round-trip time. + // Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled. + google.protobuf.Duration interval = 1; + + // The fixed value for the minRTT. This value is used when minRTT is not sampled + // dynamically. If dynamic sampling of the minRTT is disabled (i.e. `interval` is + // set to zero), this field must be set. + google.protobuf.Duration fixed_value = 6; + + // The number of requests to aggregate/sample during the minRTT recalculation + // window before updating. Defaults to 50. + google.protobuf.UInt32Value request_count = 2; + + // Randomized time delta that will be introduced to the start of the minRTT + // calculation window. This is represented as a percentage of the interval duration. + // Defaults to 15%. This is recommended to prevent all hosts in a cluster from + // being in a minRTT calculation window at the same time. + google.protobuf.DoubleValue jitter = 3; + + // The concurrency limit set while measuring the minRTT. Defaults to 3. + google.protobuf.UInt32Value min_concurrency = 4; + + // Amount added to the measured minRTT to add stability to the concurrency limit + // during natural variability in latency. This is expressed as a percentage of the + // measured value and can be adjusted to allow more or less tolerance to the sampled + // latency values. Defaults to 25%. + google.protobuf.DoubleValue buffer = 5; + } + + // The percentile to use when summarizing aggregated samples. Defaults to p50. + // Value should be between 0 and 100. + google.protobuf.DoubleValue sample_aggregate_percentile = 1; + + // Parameters for periodic recalculation of the concurrency limit. + ConcurrencyLimitCalculationParams concurrency_limit_params = 2 [(google.api.field_behavior) = REQUIRED]; + + // Parameters for periodic minRTT recalculation. + MinimumRTTCalculationParams min_rtt_calc_params = 3 [(google.api.field_behavior) = REQUIRED]; + } + + oneof concurrency_controller_config { + // Gradient concurrency control will be used. + GradientControllerConfig gradient_controller_config = 1; + } + + // If set to false, the adaptive concurrency filter will operate as a pass-through + // filter. If unspecified, the filter will be enabled. + bool enabled = 2; + + // Custom HTTP response status code to the downstream client when + // the concurrency limit has been exceeded. + // Defaults to 503 (Service Unavailable). + // Note: If this is set to < 400, 503 will be used instead. + uint32 concurrency_limit_exceeded_status = 3; +} + // SSL/TLS related settings for upstream connections. See Envoy's [TLS // context](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto.html#common-tls-configuration) // for more details. These settings are common to both HTTP and TCP upstreams. diff --git a/networking/v1alpha3/destination_rule_deepcopy.gen.go b/networking/v1alpha3/destination_rule_deepcopy.gen.go index 6931985ff1..117dbecd49 100644 --- a/networking/v1alpha3/destination_rule_deepcopy.gen.go +++ b/networking/v1alpha3/destination_rule_deepcopy.gen.go @@ -404,6 +404,90 @@ func (in *OutlierDetection) DeepCopyInterface() interface{} { return in.DeepCopy() } +// DeepCopyInto supports using AdaptiveConcurrency within kubernetes types, where deepcopy-gen is used. +func (in *AdaptiveConcurrency) DeepCopyInto(out *AdaptiveConcurrency) { + p := proto.Clone(in).(*AdaptiveConcurrency) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency. Required by controller-gen. +func (in *AdaptiveConcurrency) DeepCopy() *AdaptiveConcurrency { + if in == nil { + return nil + } + out := new(AdaptiveConcurrency) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency. Required by controller-gen. +func (in *AdaptiveConcurrency) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using AdaptiveConcurrency_GradientControllerConfig within kubernetes types, where deepcopy-gen is used. +func (in *AdaptiveConcurrency_GradientControllerConfig) DeepCopyInto(out *AdaptiveConcurrency_GradientControllerConfig) { + p := proto.Clone(in).(*AdaptiveConcurrency_GradientControllerConfig) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig) DeepCopy() *AdaptiveConcurrency_GradientControllerConfig { + if in == nil { + return nil + } + out := new(AdaptiveConcurrency_GradientControllerConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams within kubernetes types, where deepcopy-gen is used. +func (in *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) DeepCopyInto(out *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) { + p := proto.Clone(in).(*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) DeepCopy() *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams { + if in == nil { + return nil + } + out := new(AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams within kubernetes types, where deepcopy-gen is used. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) DeepCopyInto(out *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) { + p := proto.Clone(in).(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) DeepCopy() *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams { + if in == nil { + return nil + } + out := new(AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + // DeepCopyInto supports using ClientTLSSettings within kubernetes types, where deepcopy-gen is used. func (in *ClientTLSSettings) DeepCopyInto(out *ClientTLSSettings) { p := proto.Clone(in).(*ClientTLSSettings) diff --git a/networking/v1alpha3/destination_rule_json.gen.go b/networking/v1alpha3/destination_rule_json.gen.go index 9b6392b137..cca1e7b686 100644 --- a/networking/v1alpha3/destination_rule_json.gen.go +++ b/networking/v1alpha3/destination_rule_json.gen.go @@ -215,6 +215,50 @@ func (this *OutlierDetection) UnmarshalJSON(b []byte) error { return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for AdaptiveConcurrency +func (this *AdaptiveConcurrency) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AdaptiveConcurrency +func (this *AdaptiveConcurrency) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for AdaptiveConcurrency_GradientControllerConfig +func (this *AdaptiveConcurrency_GradientControllerConfig) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AdaptiveConcurrency_GradientControllerConfig +func (this *AdaptiveConcurrency_GradientControllerConfig) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams +func (this *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams +func (this *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams +func (this *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams +func (this *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + // MarshalJSON is a custom marshaler for ClientTLSSettings func (this *ClientTLSSettings) MarshalJSON() ([]byte, error) { str, err := DestinationRuleMarshaler.MarshalToString(this) diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index e4ba6cb84e..d13bc4ca27 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -318,6 +318,61 @@ const ConnectionPoolSettings_HTTPSettings_UPGRADE ConnectionPoolSettings_HTTPSet // ``` type OutlierDetection = v1alpha3.OutlierDetection +// Adaptive concurrency settings for dynamically adjusting the allowed number of +// outstanding requests based on sampled latencies. See Envoy's +// [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) +// for more details. +// +// The following example configures adaptive concurrency for the my-service +// service with a gradient controller: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: my-service-adaptive +// +// spec: +// +// host: my-service.default.svc.cluster.local +// trafficPolicy: +// adaptiveConcurrency: +// enabled: true +// gradientControllerConfig: +// sampleAggregatePercentile: 50 +// concurrencyLimitParams: +// maxConcurrencyLimit: 1000 +// concurrencyUpdateInterval: 100ms +// minRttCalcParams: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 +// buffer: 25 +// concurrencyLimitExceededStatus: 503 +// +// ``` +type AdaptiveConcurrency = v1alpha3.AdaptiveConcurrency + +// Configuration parameters for the gradient concurrency controller. +// The gradient controller makes forwarding decisions based on a periodically +// measured ideal round-trip time (minRTT) for an upstream. +type AdaptiveConcurrency_GradientControllerConfig = v1alpha3.AdaptiveConcurrency_GradientControllerConfig + +// Parameters controlling the periodic recalculation of the concurrency limit +// from sampled request latencies. +type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams + +// Parameters controlling the periodic minRTT recalculation. +// The minRTT is periodically measured by allowing only a very low outstanding +// request count to an upstream cluster and measuring the latency under +// these ideal conditions. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams + +// Gradient concurrency control will be used. +type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ + // SSL/TLS related settings for upstream connections. See Envoy's [TLS // context](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto.html#common-tls-configuration) // for more details. These settings are common to both HTTP and TCP upstreams. diff --git a/releasenotes/notes/add-adaptive-concurrency-to-destination-rule.yaml b/releasenotes/notes/add-adaptive-concurrency-to-destination-rule.yaml new file mode 100644 index 0000000000..efdc8fd5ca --- /dev/null +++ b/releasenotes/notes/add-adaptive-concurrency-to-destination-rule.yaml @@ -0,0 +1,11 @@ +apiVersion: release-notes/v2 + +kind: feature +area: traffic-management +issue: [] + +releaseNotes: +- | + **Added** adaptive concurrency filter configuration to DestinationRule TrafficPolicy API. + This enables dynamic concurrency limiting for upstream services based on sampled latency + measurements using Envoy's gradient controller. From 61833a00db0d9e6d085370cee6ead134aed1caeb Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Fri, 6 Mar 2026 09:18:48 -0800 Subject: [PATCH 02/11] Updating the comment for adaptive_concurrency field --- networking/v1alpha3/destination_rule.pb.go | 12 ++++++++++++ networking/v1alpha3/destination_rule.pb.html | 10 ++++++++++ networking/v1alpha3/destination_rule.proto | 12 ++++++++++++ 3 files changed, 34 insertions(+) diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 76437450a9..797a55e970 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -560,6 +560,18 @@ type TrafficPolicy struct { // Adaptive concurrency settings for dynamically adjusting the allowed number of // outstanding requests based on sampled latencies. This enables the Envoy // adaptive concurrency filter for the destination. + // + // Note: This operates independently from circuit breaker thresholds (e.g. + // max_connections). Both mechanisms can reject requests, but they act at + // different layers: adaptive concurrency limits outstanding requests at + // the HTTP filter level before routing, while circuit breakers limit + // connections and requests at the cluster connection pool level. When both + // are configured, the more restrictive limit is the effective constraint. + // + // Requests rejected by adaptive concurrency will NOT be reflected in + // circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked + // separately via the adaptive_concurrency.gradient_controller.rq_blocked + // counter. AdaptiveConcurrency *AdaptiveConcurrency `protobuf:"bytes,9,opt,name=adaptive_concurrency,json=adaptiveConcurrency,proto3" json:"adaptive_concurrency,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index 781f85bc15..6892bbd204 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -286,6 +286,16 @@

TrafficPolicy

Adaptive concurrency settings for dynamically adjusting the allowed number of outstanding requests based on sampled latencies. This enables the Envoy adaptive concurrency filter for the destination.

+

Note: This operates independently from circuit breaker thresholds (e.g. +max_connections). Both mechanisms can reject requests, but they act at +different layers: adaptive concurrency limits outstanding requests at +the HTTP filter level before routing, while circuit breakers limit +connections and requests at the cluster connection pool level. When both +are configured, the more restrictive limit is the effective constraint.

+

Requests rejected by adaptive concurrency will NOT be reflected in +circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked +separately via the adaptive_concurrency.gradient_controller.rq_blocked +counter.

diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 0cf1803aa3..b437433a42 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -311,6 +311,18 @@ message TrafficPolicy { // Adaptive concurrency settings for dynamically adjusting the allowed number of // outstanding requests based on sampled latencies. This enables the Envoy // adaptive concurrency filter for the destination. + // + // Note: This operates independently from circuit breaker thresholds (e.g. + // max_connections). Both mechanisms can reject requests, but they act at + // different layers: adaptive concurrency limits outstanding requests at + // the HTTP filter level before routing, while circuit breakers limit + // connections and requests at the cluster connection pool level. When both + // are configured, the more restrictive limit is the effective constraint. + // + // Requests rejected by adaptive concurrency will NOT be reflected in + // circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked + // separately via the adaptive_concurrency.gradient_controller.rq_blocked + // counter. AdaptiveConcurrency adaptive_concurrency = 9; } From 9e0d05c86d6b810b44c9b971ea88ae238b282fd7 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Fri, 6 Mar 2026 09:22:55 -0800 Subject: [PATCH 03/11] Updating the comment for adaptive_concurrency field --- networking/v1alpha3/destination_rule.pb.go | 7 +++++++ networking/v1alpha3/destination_rule.pb.html | 6 ++++++ networking/v1alpha3/destination_rule.proto | 7 +++++++ 3 files changed, 20 insertions(+) diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 797a55e970..9e79326a2d 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -572,6 +572,13 @@ type TrafficPolicy struct { // circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked // separately via the adaptive_concurrency.gradient_controller.rq_blocked // counter. + // + // Unlike circuit breaker overflows, responses rejected by adaptive concurrency + // will NOT include the x-envoy-overloaded header. Clients or sidecars that + // rely on this header to detect overload-induced 503s (e.g. for retry + // decisions or backoff) should be aware of this difference. The response body + // will be "reached concurrency limit" and the response details will be + // "reached_concurrency_limit". AdaptiveConcurrency *AdaptiveConcurrency `protobuf:"bytes,9,opt,name=adaptive_concurrency,json=adaptiveConcurrency,proto3" json:"adaptive_concurrency,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index 6892bbd204..6e9b20fbca 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -296,6 +296,12 @@

TrafficPolicy

circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked separately via the adaptive_concurrency.gradient_controller.rq_blocked counter.

+

Unlike circuit breaker overflows, responses rejected by adaptive concurrency +will NOT include the x-envoy-overloaded header. Clients or sidecars that +rely on this header to detect overload-induced 503s (e.g. for retry +decisions or backoff) should be aware of this difference. The response body +will be “reached concurrency limit” and the response details will be +“reached_concurrency_limit”.

diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index b437433a42..01dff46a7a 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -323,6 +323,13 @@ message TrafficPolicy { // circuit breaker statistics (e.g. upstream_cx_overflow). They are tracked // separately via the adaptive_concurrency.gradient_controller.rq_blocked // counter. + // + // Unlike circuit breaker overflows, responses rejected by adaptive concurrency + // will NOT include the x-envoy-overloaded header. Clients or sidecars that + // rely on this header to detect overload-induced 503s (e.g. for retry + // decisions or backoff) should be aware of this difference. The response body + // will be "reached concurrency limit" and the response details will be + // "reached_concurrency_limit". AdaptiveConcurrency adaptive_concurrency = 9; } From ca070cd9b394189f92e064cf4f7ac8101fec1726 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Thu, 12 Mar 2026 22:55:52 -0700 Subject: [PATCH 04/11] Updating the review comments --- networking/v1alpha3/destination_rule.proto | 57 ++++++++++++++++------ 1 file changed, 42 insertions(+), 15 deletions(-) diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 01dff46a7a..f193f68f43 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -858,7 +858,6 @@ message OutlierDetection { // host: my-service.default.svc.cluster.local // trafficPolicy: // adaptiveConcurrency: -// enabled: true // gradientControllerConfig: // sampleAggregatePercentile: 50 // concurrencyLimitParams: @@ -882,6 +881,26 @@ message AdaptiveConcurrency { // from sampled request latencies. message ConcurrencyLimitCalculationParams { // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. + // + // This acts as a safety cap on the gradient algorithm's output, the algorithm + // dynamically adjusts the concurrency limit based on measured latency (via the + // gradient formula: new_limit = old_limit * gradient + headroom), but the result + // is clamped to [min_concurrency, max_concurrency_limit] before being applied. + // The gradient calculation itself is not influenced by this value. + // + // In most cases the default of 1000 is sufficient, since the algorithm will + // self-regulate well below this ceiling based on observed latencies. Consider + // lowering it only if you know the upstream's maximum sustainable concurrency + // and want a hard safety net beyond the algorithm's own backoff behavior. + // Setting this too low may prevent the algorithm from reaching the upstream's + // true capacity. Note that this limit applies per filter config instance + // (typically one per Envoy process per listener), so the aggregate concurrency + // across N Envoy instances can reach up to N * max_concurrency_limit. + // + // Overridable at runtime via + // adaptive_concurrency.gradient_controller.max_concurrency_limit. + // Monitor the concurrency_limit gauge to observe where the algorithm settles + // under normal load. google.protobuf.UInt32Value max_concurrency_limit = 2; // The period of time samples are taken to recalculate the concurrency limit. @@ -895,12 +914,23 @@ message AdaptiveConcurrency { // these ideal conditions. message MinimumRTTCalculationParams { // The time interval between recalculating the minimum request round-trip time. - // Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled. + // Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT + // is disabled and `fixed_value` must be provided instead. + // There is no default — one of `interval` or `fixed_value` must be specified. + // + // When dynamic sampling is enabled (interval > 0), the controller periodically + // enters a low-concurrency measurement window (pinned to `min_concurrency`) to + // re-measure the baseline latency. During this window, throughput is temporarily + // reduced, so longer intervals reduce overhead but may react slower to changes + // in upstream performance. google.protobuf.Duration interval = 1; - // The fixed value for the minRTT. This value is used when minRTT is not sampled - // dynamically. If dynamic sampling of the minRTT is disabled (i.e. `interval` is - // set to zero), this field must be set. + // The fixed value for the minRTT, used when dynamic sampling is disabled + // (i.e. `interval` is unset or zero). Must be positive when set. + // This field is mutually exclusive with a positive `interval` — if `interval` + // is set, `fixed_value` is ignored and the minRTT is sampled dynamically. + // Use this when the baseline latency of the upstream is well-known and stable, + // to avoid the periodic low-concurrency measurement windows. google.protobuf.Duration fixed_value = 6; // The number of requests to aggregate/sample during the minRTT recalculation @@ -909,9 +939,10 @@ message AdaptiveConcurrency { // Randomized time delta that will be introduced to the start of the minRTT // calculation window. This is represented as a percentage of the interval duration. - // Defaults to 15%. This is recommended to prevent all hosts in a cluster from + // Defaults to 15%. Value must be in the range [0, 100]. + // This is recommended to prevent all hosts in a cluster from // being in a minRTT calculation window at the same time. - google.protobuf.DoubleValue jitter = 3; + google.protobuf.UInt32Value jitter = 3; // The concurrency limit set while measuring the minRTT. Defaults to 3. google.protobuf.UInt32Value min_concurrency = 4; @@ -919,13 +950,13 @@ message AdaptiveConcurrency { // Amount added to the measured minRTT to add stability to the concurrency limit // during natural variability in latency. This is expressed as a percentage of the // measured value and can be adjusted to allow more or less tolerance to the sampled - // latency values. Defaults to 25%. - google.protobuf.DoubleValue buffer = 5; + // latency values. Defaults to 25%. Value must be in the range [0, 100]. + google.protobuf.UInt32Value buffer = 5; } // The percentile to use when summarizing aggregated samples. Defaults to p50. - // Value should be between 0 and 100. - google.protobuf.DoubleValue sample_aggregate_percentile = 1; + // Value must be in the range [0, 100]. + google.protobuf.UInt32Value sample_aggregate_percentile = 1; // Parameters for periodic recalculation of the concurrency limit. ConcurrencyLimitCalculationParams concurrency_limit_params = 2 [(google.api.field_behavior) = REQUIRED]; @@ -939,10 +970,6 @@ message AdaptiveConcurrency { GradientControllerConfig gradient_controller_config = 1; } - // If set to false, the adaptive concurrency filter will operate as a pass-through - // filter. If unspecified, the filter will be enabled. - bool enabled = 2; - // Custom HTTP response status code to the downstream client when // the concurrency limit has been exceeded. // Defaults to 503 (Service Unavailable). From 7c2ad9a89d9dc7e75240287485e2597826100fdc Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Thu, 12 Mar 2026 22:59:20 -0700 Subject: [PATCH 05/11] Updating the review comments --- kubernetes/customresourcedefinitions.gen.yaml | 132 +++++++++--------- networking/v1/destination_rule_alias.gen.go | 1 - networking/v1alpha3/destination_rule.pb.go | 86 +++++++----- networking/v1alpha3/destination_rule.pb.html | 59 +++++--- .../v1beta1/destination_rule_alias.gen.go | 1 - 5 files changed, 157 insertions(+), 122 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 411bf7652f..42c758542f 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -451,10 +451,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency - filter will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -487,11 +483,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, + used when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -509,9 +507,10 @@ spec: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -531,9 +530,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams @@ -1500,10 +1500,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency filter - will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -1535,11 +1531,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, used + when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -1554,9 +1552,10 @@ spec: jitter: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -1575,9 +1574,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams @@ -2660,10 +2660,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency - filter will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -2696,11 +2692,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, + used when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -2718,9 +2716,10 @@ spec: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -2740,9 +2739,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams @@ -3709,10 +3709,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency filter - will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -3744,11 +3740,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, used + when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -3763,9 +3761,10 @@ spec: jitter: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -3784,9 +3783,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams @@ -4869,10 +4869,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency - filter will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -4905,11 +4901,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, + used when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -4927,9 +4925,10 @@ spec: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -4949,9 +4948,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams @@ -5918,10 +5918,6 @@ spec: maximum: 4294967295 minimum: 0 type: integer - enabled: - description: If set to false, the adaptive concurrency filter - will operate as a pass-through filter. - type: boolean gradientControllerConfig: description: Gradient concurrency control will be used. properties: @@ -5953,11 +5949,13 @@ spec: description: Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer fixedValue: - description: The fixed value for the minRTT. + description: The fixed value for the minRTT, used + when dynamic sampling is disabled (i.e. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -5972,9 +5970,10 @@ spec: jitter: description: Randomized time delta that will be introduced to the start of the minRTT calculation window. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer minConcurrency: description: The concurrency limit set while measuring the minRTT. @@ -5993,9 +5992,10 @@ spec: sampleAggregatePercentile: description: The percentile to use when summarizing aggregated samples. - format: double + maximum: 4294967295 + minimum: 0 nullable: true - type: number + type: integer required: - concurrencyLimitParams - minRttCalcParams diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 655beb2875..fa44c854f7 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -338,7 +338,6 @@ type OutlierDetection = v1alpha3.OutlierDetection // host: my-service.default.svc.cluster.local // trafficPolicy: // adaptiveConcurrency: -// enabled: true // gradientControllerConfig: // sampleAggregatePercentile: 50 // concurrencyLimitParams: diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 9e79326a2d..c912eabf90 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -1330,7 +1330,6 @@ func (x *OutlierDetection) GetMinHealthPercent() int32 { // host: my-service.default.svc.cluster.local // trafficPolicy: // adaptiveConcurrency: -// enabled: true // gradientControllerConfig: // sampleAggregatePercentile: 50 // concurrencyLimitParams: @@ -1351,9 +1350,6 @@ type AdaptiveConcurrency struct { // // *AdaptiveConcurrency_GradientControllerConfig_ ConcurrencyControllerConfig isAdaptiveConcurrency_ConcurrencyControllerConfig `protobuf_oneof:"concurrency_controller_config"` - // If set to false, the adaptive concurrency filter will operate as a pass-through - // filter. If unspecified, the filter will be enabled. - Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` // Custom HTTP response status code to the downstream client when // the concurrency limit has been exceeded. // Defaults to 503 (Service Unavailable). @@ -1409,13 +1405,6 @@ func (x *AdaptiveConcurrency) GetGradientControllerConfig() *AdaptiveConcurrency return nil } -func (x *AdaptiveConcurrency) GetEnabled() bool { - if x != nil { - return x.Enabled - } - return false -} - func (x *AdaptiveConcurrency) GetConcurrencyLimitExceededStatus() uint32 { if x != nil { return x.ConcurrencyLimitExceededStatus @@ -2845,8 +2834,8 @@ func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) GetInterval() *duratio type AdaptiveConcurrency_GradientControllerConfig struct { state protoimpl.MessageState `protogen:"open.v1"` // The percentile to use when summarizing aggregated samples. Defaults to p50. - // Value should be between 0 and 100. - SampleAggregatePercentile *wrappers.DoubleValue `protobuf:"bytes,1,opt,name=sample_aggregate_percentile,json=sampleAggregatePercentile,proto3" json:"sample_aggregate_percentile,omitempty"` + // Value must be in the range [0, 100]. + SampleAggregatePercentile *wrappers.UInt32Value `protobuf:"bytes,1,opt,name=sample_aggregate_percentile,json=sampleAggregatePercentile,proto3" json:"sample_aggregate_percentile,omitempty"` // Parameters for periodic recalculation of the concurrency limit. ConcurrencyLimitParams *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams `protobuf:"bytes,2,opt,name=concurrency_limit_params,json=concurrencyLimitParams,proto3" json:"concurrency_limit_params,omitempty"` // Parameters for periodic minRTT recalculation. @@ -2885,7 +2874,7 @@ func (*AdaptiveConcurrency_GradientControllerConfig) Descriptor() ([]byte, []int return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0} } -func (x *AdaptiveConcurrency_GradientControllerConfig) GetSampleAggregatePercentile() *wrappers.DoubleValue { +func (x *AdaptiveConcurrency_GradientControllerConfig) GetSampleAggregatePercentile() *wrappers.UInt32Value { if x != nil { return x.SampleAggregatePercentile } @@ -2911,6 +2900,26 @@ func (x *AdaptiveConcurrency_GradientControllerConfig) GetMinRttCalcParams() *Ad type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams struct { state protoimpl.MessageState `protogen:"open.v1"` // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. + // + // This acts as a safety cap on the gradient algorithm's output, the algorithm + // dynamically adjusts the concurrency limit based on measured latency (via the + // gradient formula: new_limit = old_limit * gradient + headroom), but the result + // is clamped to [min_concurrency, max_concurrency_limit] before being applied. + // The gradient calculation itself is not influenced by this value. + // + // In most cases the default of 1000 is sufficient, since the algorithm will + // self-regulate well below this ceiling based on observed latencies. Consider + // lowering it only if you know the upstream's maximum sustainable concurrency + // and want a hard safety net beyond the algorithm's own backoff behavior. + // Setting this too low may prevent the algorithm from reaching the upstream's + // true capacity. Note that this limit applies per filter config instance + // (typically one per Envoy process per listener), so the aggregate concurrency + // across N Envoy instances can reach up to N * max_concurrency_limit. + // + // Overridable at runtime via + // adaptive_concurrency.gradient_controller.max_concurrency_limit. + // Monitor the concurrency_limit gauge to observe where the algorithm settles + // under normal load. MaxConcurrencyLimit *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrency_limit,json=maxConcurrencyLimit,proto3" json:"max_concurrency_limit,omitempty"` // The period of time samples are taken to recalculate the concurrency limit. // This is required. @@ -2971,27 +2980,39 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculatio type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams struct { state protoimpl.MessageState `protogen:"open.v1"` // The time interval between recalculating the minimum request round-trip time. - // Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled. + // Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT + // is disabled and `fixed_value` must be provided instead. + // There is no default — one of `interval` or `fixed_value` must be specified. + // + // When dynamic sampling is enabled (interval > 0), the controller periodically + // enters a low-concurrency measurement window (pinned to `min_concurrency`) to + // re-measure the baseline latency. During this window, throughput is temporarily + // reduced, so longer intervals reduce overhead but may react slower to changes + // in upstream performance. Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // The fixed value for the minRTT. This value is used when minRTT is not sampled - // dynamically. If dynamic sampling of the minRTT is disabled (i.e. `interval` is - // set to zero), this field must be set. + // The fixed value for the minRTT, used when dynamic sampling is disabled + // (i.e. `interval` is unset or zero). Must be positive when set. + // This field is mutually exclusive with a positive `interval` — if `interval` + // is set, `fixed_value` is ignored and the minRTT is sampled dynamically. + // Use this when the baseline latency of the upstream is well-known and stable, + // to avoid the periodic low-concurrency measurement windows. FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3" json:"fixed_value,omitempty"` // The number of requests to aggregate/sample during the minRTT recalculation // window before updating. Defaults to 50. RequestCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` // Randomized time delta that will be introduced to the start of the minRTT // calculation window. This is represented as a percentage of the interval duration. - // Defaults to 15%. This is recommended to prevent all hosts in a cluster from + // Defaults to 15%. Value must be in the range [0, 100]. + // This is recommended to prevent all hosts in a cluster from // being in a minRTT calculation window at the same time. - Jitter *wrappers.DoubleValue `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` + Jitter *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` // The concurrency limit set while measuring the minRTT. Defaults to 3. MinConcurrency *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` // Amount added to the measured minRTT to add stability to the concurrency limit // during natural variability in latency. This is expressed as a percentage of the // measured value and can be adjusted to allow more or less tolerance to the sampled - // latency values. Defaults to 25%. - Buffer *wrappers.DoubleValue `protobuf:"bytes,5,opt,name=buffer,proto3" json:"buffer,omitempty"` + // latency values. Defaults to 25%. Value must be in the range [0, 100]. + Buffer *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=buffer,proto3" json:"buffer,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3047,7 +3068,7 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParam return nil } -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetJitter() *wrappers.DoubleValue { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetJitter() *wrappers.UInt32Value { if x != nil { return x.Jitter } @@ -3061,7 +3082,7 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParam return nil } -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetBuffer() *wrappers.DoubleValue { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetBuffer() *wrappers.UInt32Value { if x != nil { return x.Buffer } @@ -3331,14 +3352,13 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12G\n" + "\x12base_ejection_time\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x10baseEjectionTime\x120\n" + "\x14max_ejection_percent\x18\x04 \x01(\x05R\x12maxEjectionPercent\x12,\n" + - "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xc9\n" + + "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xaf\n" + "\n" + "\x13AdaptiveConcurrency\x12\x87\x01\n" + - "\x1agradient_controller_config\x18\x01 \x01(\v2G.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfigH\x00R\x18gradientControllerConfig\x12\x18\n" + - "\aenabled\x18\x02 \x01(\bR\aenabled\x12I\n" + + "\x1agradient_controller_config\x18\x01 \x01(\v2G.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfigH\x00R\x18gradientControllerConfig\x12I\n" + "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xa1\b\n" + "\x18GradientControllerConfig\x12\\\n" + - "\x1bsample_aggregate_percentile\x18\x01 \x01(\v2\x1c.google.protobuf.DoubleValueR\x19sampleAggregatePercentile\x12\xa9\x01\n" + + "\x1bsample_aggregate_percentile\x18\x01 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x19sampleAggregatePercentile\x12\xa9\x01\n" + "\x18concurrency_limit_params\x18\x02 \x01(\v2i.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParamsB\x04\xe2A\x01\x02R\x16concurrencyLimitParams\x12\x98\x01\n" + "\x13min_rtt_calc_params\x18\x03 \x01(\v2c.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParamsB\x04\xe2A\x01\x02R\x10minRttCalcParams\x1a\xd6\x01\n" + "!ConcurrencyLimitCalculationParams\x12P\n" + @@ -3349,9 +3369,9 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\vfixed_value\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\n" + "fixedValue\x12A\n" + "\rrequest_count\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\frequestCount\x124\n" + - "\x06jitter\x18\x03 \x01(\v2\x1c.google.protobuf.DoubleValueR\x06jitter\x12E\n" + + "\x06jitter\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06jitter\x12E\n" + "\x0fmin_concurrency\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0eminConcurrency\x124\n" + - "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.DoubleValueR\x06bufferB\x1f\n" + + "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06bufferB\x1f\n" + "\x1dconcurrency_controller_config\"\xe4\x03\n" + "\x11ClientTLSSettings\x12H\n" + "\x04mode\x18\x01 \x01(\x0e24.istio.networking.v1alpha3.ClientTLSSettings.TLSmodeR\x04mode\x12-\n" + @@ -3500,7 +3520,7 @@ var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 2, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy 34, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration 34, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration - 35, // 55: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.sample_aggregate_percentile:type_name -> google.protobuf.DoubleValue + 36, // 55: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.sample_aggregate_percentile:type_name -> google.protobuf.UInt32Value 28, // 56: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.concurrency_limit_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams 29, // 57: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.min_rtt_calc_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams 36, // 58: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.max_concurrency_limit:type_name -> google.protobuf.UInt32Value @@ -3508,9 +3528,9 @@ var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 34, // 60: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.interval:type_name -> google.protobuf.Duration 34, // 61: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.fixed_value:type_name -> google.protobuf.Duration 36, // 62: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.request_count:type_name -> google.protobuf.UInt32Value - 35, // 63: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.jitter:type_name -> google.protobuf.DoubleValue + 36, // 63: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.jitter:type_name -> google.protobuf.UInt32Value 36, // 64: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.min_concurrency:type_name -> google.protobuf.UInt32Value - 35, // 65: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> google.protobuf.DoubleValue + 36, // 65: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> google.protobuf.UInt32Value 32, // 66: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry 67, // [67:67] is the sub-list for method output_type 67, // [67:67] is the sub-list for method input_type diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index 6e9b20fbca..097aa7383d 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -1518,7 +1518,6 @@

AdaptiveConcurrency

host: my-service.default.svc.cluster.local trafficPolicy: adaptiveConcurrency: - enabled: true gradientControllerConfig: sampleAggregatePercentile: 50 concurrencyLimitParams: @@ -1548,16 +1547,6 @@

AdaptiveConcurrency

- - - - @@ -1591,11 +1580,11 @@

GradientControllerConfig

@@ -1641,6 +1630,23 @@

@@ -1688,9 +1701,12 @@

Duration

@@ -1706,12 +1722,13 @@

@@ -1727,13 +1744,13 @@

diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index d13bc4ca27..eed350964c 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -338,7 +338,6 @@ type OutlierDetection = v1alpha3.OutlierDetection // host: my-service.default.svc.cluster.local // trafficPolicy: // adaptiveConcurrency: -// enabled: true // gradientControllerConfig: // sampleAggregatePercentile: 50 // concurrencyLimitParams: From 0cd5f0987e7dad9385a376f399f685b4147721a3 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Sat, 21 Mar 2026 23:09:33 -0700 Subject: [PATCH 06/11] Making the min_rtt_source a oneOf --- networking/v1alpha3/destination_rule.proto | 36 ++++++++++------------ 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index f193f68f43..c5ceeac21c 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -913,25 +913,23 @@ message AdaptiveConcurrency { // request count to an upstream cluster and measuring the latency under // these ideal conditions. message MinimumRTTCalculationParams { - // The time interval between recalculating the minimum request round-trip time. - // Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT - // is disabled and `fixed_value` must be provided instead. - // There is no default — one of `interval` or `fixed_value` must be specified. - // - // When dynamic sampling is enabled (interval > 0), the controller periodically - // enters a low-concurrency measurement window (pinned to `min_concurrency`) to - // re-measure the baseline latency. During this window, throughput is temporarily - // reduced, so longer intervals reduce overhead but may react slower to changes - // in upstream performance. - google.protobuf.Duration interval = 1; - - // The fixed value for the minRTT, used when dynamic sampling is disabled - // (i.e. `interval` is unset or zero). Must be positive when set. - // This field is mutually exclusive with a positive `interval` — if `interval` - // is set, `fixed_value` is ignored and the minRTT is sampled dynamically. - // Use this when the baseline latency of the upstream is well-known and stable, - // to avoid the periodic low-concurrency measurement windows. - google.protobuf.Duration fixed_value = 6; + // Exactly one of `interval` or `fixed_value` must be set to determine + // how the minRTT is obtained. + oneof min_rtt_source { + // The time interval between recalculating the minimum request round-trip + // time. Must be >= 1ms. + // + // When set, the controller periodically enters a low-concurrency measurement + // window (pinned to `min_concurrency`) to re-measure the baseline latency. + // During this window, throughput is temporarily reduced, so longer intervals + // reduce overhead but may react slower to changes in upstream performance. + google.protobuf.Duration interval = 1; + + // A fixed value for the minRTT. Must be positive. + // Use this when the baseline latency of the upstream is well-known and + // stable, to avoid the periodic low-concurrency measurement windows. + google.protobuf.Duration fixed_value = 6; + } // The number of requests to aggregate/sample during the minRTT recalculation // window before updating. Defaults to 50. From 04acd8dda3ef9353db494700335fbfa42c0f0be2 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Sat, 21 Mar 2026 23:12:34 -0700 Subject: [PATCH 07/11] Making the min_rtt_source a oneOf --- kubernetes/customresourcedefinitions.gen.yaml | 84 +++++++++++++++--- networking/v1/destination_rule_alias.gen.go | 14 +++ networking/v1alpha3/destination_rule.pb.go | 86 +++++++++++++------ networking/v1alpha3/destination_rule.pb.html | 32 +++---- .../v1beta1/destination_rule_alias.gen.go | 14 +++ 5 files changed, 173 insertions(+), 57 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 42c758542f..c2ab1a4ca1 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -478,6 +478,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT @@ -488,8 +499,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, - used when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -1526,6 +1536,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT to @@ -1536,8 +1557,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, used - when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -2687,6 +2707,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT @@ -2697,8 +2728,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, - used when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -3735,6 +3765,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT to @@ -3745,8 +3786,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, used - when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -4896,6 +4936,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT @@ -4906,8 +4957,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, - used when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -5944,6 +5994,17 @@ spec: type: object minRttCalcParams: description: Parameters for periodic minRTT recalculation. + oneOf: + - not: + anyOf: + - required: + - interval + - required: + - fixedValue + - required: + - interval + - required: + - fixedValue properties: buffer: description: Amount added to the measured minRTT to @@ -5954,8 +6015,7 @@ spec: nullable: true type: integer fixedValue: - description: The fixed value for the minRTT, used - when dynamic sampling is disabled (i.e. + description: A fixed value for the minRTT. type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index fa44c854f7..afecd0f1f6 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -369,6 +369,20 @@ type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationPar // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams +// The time interval between recalculating the minimum request round-trip +// time. Must be >= 1ms. +// +// When set, the controller periodically enters a low-concurrency measurement +// window (pinned to `min_concurrency`) to re-measure the baseline latency. +// During this window, throughput is temporarily reduced, so longer intervals +// reduce overhead but may react slower to changes in upstream performance. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval + +// A fixed value for the minRTT. Must be positive. +// Use this when the baseline latency of the upstream is well-known and +// stable, to avoid the periodic low-concurrency measurement windows. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue + // Gradient concurrency control will be used. type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index c912eabf90..aa10616cdb 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -2979,24 +2979,14 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculatio // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams struct { state protoimpl.MessageState `protogen:"open.v1"` - // The time interval between recalculating the minimum request round-trip time. - // Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT - // is disabled and `fixed_value` must be provided instead. - // There is no default — one of `interval` or `fixed_value` must be specified. + // Exactly one of `interval` or `fixed_value` must be set to determine + // how the minRTT is obtained. // - // When dynamic sampling is enabled (interval > 0), the controller periodically - // enters a low-concurrency measurement window (pinned to `min_concurrency`) to - // re-measure the baseline latency. During this window, throughput is temporarily - // reduced, so longer intervals reduce overhead but may react slower to changes - // in upstream performance. - Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` - // The fixed value for the minRTT, used when dynamic sampling is disabled - // (i.e. `interval` is unset or zero). Must be positive when set. - // This field is mutually exclusive with a positive `interval` — if `interval` - // is set, `fixed_value` is ignored and the minRTT is sampled dynamically. - // Use this when the baseline latency of the upstream is well-known and stable, - // to avoid the periodic low-concurrency measurement windows. - FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3" json:"fixed_value,omitempty"` + // Types that are valid to be assigned to MinRttSource: + // + // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval + // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue + MinRttSource isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource `protobuf_oneof:"min_rtt_source"` // The number of requests to aggregate/sample during the minRTT recalculation // window before updating. Defaults to 50. RequestCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` @@ -3047,16 +3037,27 @@ func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0, 1} } +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetMinRttSource() isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource { + if x != nil { + return x.MinRttSource + } + return nil +} + func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetInterval() *duration.Duration { if x != nil { - return x.Interval + if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval); ok { + return x.Interval + } } return nil } func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetFixedValue() *duration.Duration { if x != nil { - return x.FixedValue + if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue); ok { + return x.FixedValue + } } return nil } @@ -3089,6 +3090,34 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParam return nil } +type isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource interface { + isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() +} + +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval struct { + // The time interval between recalculating the minimum request round-trip + // time. Must be >= 1ms. + // + // When set, the controller periodically enters a low-concurrency measurement + // window (pinned to `min_concurrency`) to re-measure the baseline latency. + // During this window, throughput is temporarily reduced, so longer intervals + // reduce overhead but may react slower to changes in upstream performance. + Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3,oneof"` +} + +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue struct { + // A fixed value for the minRTT. Must be positive. + // Use this when the baseline latency of the upstream is well-known and + // stable, to avoid the periodic low-concurrency measurement windows. + FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3,oneof"` +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +} + // Describes how traffic originating in the 'from' zone or sub-zone is // distributed over a set of 'to' zones. Syntax for specifying a zone is // {region}/{zone}/{sub-zone} and terminal wildcards are allowed on any @@ -3352,26 +3381,27 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12G\n" + "\x12base_ejection_time\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x10baseEjectionTime\x120\n" + "\x14max_ejection_percent\x18\x04 \x01(\x05R\x12maxEjectionPercent\x12,\n" + - "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xaf\n" + + "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xc5\n" + "\n" + "\x13AdaptiveConcurrency\x12\x87\x01\n" + "\x1agradient_controller_config\x18\x01 \x01(\v2G.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfigH\x00R\x18gradientControllerConfig\x12I\n" + - "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xa1\b\n" + + "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xb7\b\n" + "\x18GradientControllerConfig\x12\\\n" + "\x1bsample_aggregate_percentile\x18\x01 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x19sampleAggregatePercentile\x12\xa9\x01\n" + "\x18concurrency_limit_params\x18\x02 \x01(\v2i.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParamsB\x04\xe2A\x01\x02R\x16concurrencyLimitParams\x12\x98\x01\n" + "\x13min_rtt_calc_params\x18\x03 \x01(\v2c.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParamsB\x04\xe2A\x01\x02R\x10minRttCalcParams\x1a\xd6\x01\n" + "!ConcurrencyLimitCalculationParams\x12P\n" + "\x15max_concurrency_limit\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13maxConcurrencyLimit\x12_\n" + - "\x1bconcurrency_update_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x04\xe2A\x01\x02R\x19concurrencyUpdateInterval\x1a\x86\x03\n" + - "\x1bMinimumRTTCalculationParams\x125\n" + - "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12:\n" + - "\vfixed_value\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\n" + + "\x1bconcurrency_update_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x04\xe2A\x01\x02R\x19concurrencyUpdateInterval\x1a\x9c\x03\n" + + "\x1bMinimumRTTCalculationParams\x127\n" + + "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationH\x00R\binterval\x12<\n" + + "\vfixed_value\x18\x06 \x01(\v2\x19.google.protobuf.DurationH\x00R\n" + "fixedValue\x12A\n" + "\rrequest_count\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\frequestCount\x124\n" + "\x06jitter\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06jitter\x12E\n" + "\x0fmin_concurrency\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0eminConcurrency\x124\n" + - "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06bufferB\x1f\n" + + "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06bufferB\x10\n" + + "\x0emin_rtt_sourceB\x1f\n" + "\x1dconcurrency_controller_config\"\xe4\x03\n" + "\x11ClientTLSSettings\x12H\n" + "\x04mode\x18\x01 \x01(\x0e24.istio.networking.v1alpha3.ClientTLSSettings.TLSmodeR\x04mode\x12-\n" + @@ -3560,6 +3590,10 @@ func file_networking_v1alpha3_destination_rule_proto_init() { (*LoadBalancerSettings_ConsistentHashLB_RingHash_)(nil), (*LoadBalancerSettings_ConsistentHashLB_Maglev)(nil), } + file_networking_v1alpha3_destination_rule_proto_msgTypes[25].OneofWrappers = []any{ + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval)(nil), + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index 097aa7383d..af5c54de57 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -1679,34 +1679,28 @@

+

- + diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index eed350964c..ed3f9caace 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -369,6 +369,20 @@ type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationPar // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams +// The time interval between recalculating the minimum request round-trip +// time. Must be >= 1ms. +// +// When set, the controller periodically enters a low-concurrency measurement +// window (pinned to `min_concurrency`) to re-measure the baseline latency. +// During this window, throughput is temporarily reduced, so longer intervals +// reduce overhead but may react slower to changes in upstream performance. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval + +// A fixed value for the minRTT. Must be positive. +// Use this when the baseline latency of the upstream is well-known and +// stable, to avoid the periodic low-concurrency measurement windows. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue + // Gradient concurrency control will be used. type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ From ceecc1dbc6e14e9c40ffd28e490d617a00ce05f1 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Mon, 23 Mar 2026 18:13:38 -0700 Subject: [PATCH 08/11] Addressing the review comments --- networking/v1alpha3/destination_rule.proto | 69 +++++++++++++++++----- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index c5ceeac21c..eade9d94e0 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -841,13 +841,26 @@ message OutlierDetection { int32 min_health_percent = 5; } -// Adaptive concurrency settings for dynamically adjusting the allowed number of -// outstanding requests based on sampled latencies. See Envoy's +// Configures automatic concurrency limits for requests to an upstream service. +// When enabled, the sidecar proxy will dynamically calculate and enforce a +// maximum number of outstanding requests allowed to the destination based on +// periodic latency sampling. If the measured latency increases relative to the +// baseline (minRTT), the concurrency limit is reduced; if latency remains +// stable, the limit is gradually increased. Requests that exceed the current +// concurrency limit are immediately rejected with the configured HTTP status +// code (default 503) without being forwarded to the upstream. +// +// This is useful for protecting upstream services from being overwhelmed during +// load spikes or degraded performance, without requiring operators to manually +// set fixed concurrency thresholds. +// +// See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. // -// The following example configures adaptive concurrency for the my-service -// service with a gradient controller: +// The following example enables adaptive concurrency limiting for my-service, +// using the gradient controller to automatically adjust the concurrency limit +// based on latency measurements taken every 60 seconds: // // ```yaml // apiVersion: networking.istio.io/v1 @@ -882,24 +895,20 @@ message AdaptiveConcurrency { message ConcurrencyLimitCalculationParams { // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. // - // This acts as a safety cap on the gradient algorithm's output, the algorithm + // This acts as a safety cap on the gradient algorithm's output. The algorithm // dynamically adjusts the concurrency limit based on measured latency (via the // gradient formula: new_limit = old_limit * gradient + headroom), but the result - // is clamped to [min_concurrency, max_concurrency_limit] before being applied. - // The gradient calculation itself is not influenced by this value. + // will never exceed this value. The gradient calculation itself is not influenced + // by this cap. // // In most cases the default of 1000 is sufficient, since the algorithm will // self-regulate well below this ceiling based on observed latencies. Consider // lowering it only if you know the upstream's maximum sustainable concurrency // and want a hard safety net beyond the algorithm's own backoff behavior. // Setting this too low may prevent the algorithm from reaching the upstream's - // true capacity. Note that this limit applies per filter config instance - // (typically one per Envoy process per listener), so the aggregate concurrency - // across N Envoy instances can reach up to N * max_concurrency_limit. + // true capacity. // - // Overridable at runtime via - // adaptive_concurrency.gradient_controller.max_concurrency_limit. - // Monitor the concurrency_limit gauge to observe where the algorithm settles + // Monitor the `concurrency_limit` gauge to observe where the algorithm settles // under normal load. google.protobuf.UInt32Value max_concurrency_limit = 2; @@ -925,9 +934,21 @@ message AdaptiveConcurrency { // reduce overhead but may react slower to changes in upstream performance. google.protobuf.Duration interval = 1; - // A fixed value for the minRTT. Must be positive. + // A fixed baseline round-trip time (minRTT) for the upstream, specified + // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the + // gradient controller "assume the upstream responds in this time under + // ideal conditions" and skips dynamic sampling entirely. + // + // The gradient algorithm uses minRTT as the reference in its formula: + // gradient = (minRTT + buffer) / sampleRTT + // new_limit = old_limit × gradient + headroom + // where buffer = minRTT × buffer_percent, and headroom = sqrt(limit). + // So if measured latency rises above minRTT + buffer, the concurrency + // limit is reduced; if it stays near minRTT, the limit grows. + // // Use this when the baseline latency of the upstream is well-known and - // stable, to avoid the periodic low-concurrency measurement windows. + // stable, to avoid the periodic low-concurrency measurement windows + // that dynamic sampling (`interval`) requires. google.protobuf.Duration fixed_value = 6; } @@ -942,7 +963,23 @@ message AdaptiveConcurrency { // being in a minRTT calculation window at the same time. google.protobuf.UInt32Value jitter = 3; - // The concurrency limit set while measuring the minRTT. Defaults to 3. + // The concurrency limit pinned during the minRTT measurement window. + // Defaults to 3. + // + // During the measurement window, the filter drops the concurrency limit to + // this value to measure latency under near-idle conditions. Requests that + // exceed this limit during the window are rejected with the configured + // status code (default 503). The window lasts until `request_count` samples + // are collected. + // + // To mitigate 503s during measurement windows: + // - Use `jitter` to stagger measurement windows across hosts so they + // don't all enter the window simultaneously. + // - Configure retries (with the `previous_hosts` retry predicate) so + // rejected requests are retried on a different host not currently in + // a measurement window. + // - Alternatively, use `fixed_value` instead of `interval` to skip + // dynamic measurement entirely if the baseline latency is known. google.protobuf.UInt32Value min_concurrency = 4; // Amount added to the measured minRTT to add stability to the concurrency limit From 0b48e63b89bd67d2ca3d235a4377d5fd372e3545 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Mon, 23 Mar 2026 18:18:29 -0700 Subject: [PATCH 09/11] Addressing the review comments --- kubernetes/customresourcedefinitions.gen.yaml | 48 ++++++++----- networking/v1/destination_rule_alias.gen.go | 39 ++++++++-- networking/v1alpha3/destination_rule.pb.go | 71 ++++++++++++++----- networking/v1alpha3/destination_rule.pb.html | 67 ++++++++++++----- .../v1beta1/destination_rule_alias.gen.go | 39 ++++++++-- 5 files changed, 201 insertions(+), 63 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index c2ab1a4ca1..244e696e43 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -499,7 +499,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time + (minRTT) for the upstream, specified as a + duration (e.g., `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -522,8 +524,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while - measuring the minRTT. + description: The concurrency limit pinned during + the minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true @@ -1557,7 +1559,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time (minRTT) + for the upstream, specified as a duration (e.g., + `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -1577,8 +1581,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while measuring - the minRTT. + description: The concurrency limit pinned during the + minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true @@ -2728,7 +2732,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time + (minRTT) for the upstream, specified as a + duration (e.g., `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -2751,8 +2757,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while - measuring the minRTT. + description: The concurrency limit pinned during + the minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true @@ -3786,7 +3792,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time (minRTT) + for the upstream, specified as a duration (e.g., + `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -3806,8 +3814,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while measuring - the minRTT. + description: The concurrency limit pinned during the + minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true @@ -4957,7 +4965,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time + (minRTT) for the upstream, specified as a + duration (e.g., `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater @@ -4980,8 +4990,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while - measuring the minRTT. + description: The concurrency limit pinned during + the minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true @@ -6015,7 +6025,9 @@ spec: nullable: true type: integer fixedValue: - description: A fixed value for the minRTT. + description: A fixed baseline round-trip time (minRTT) + for the upstream, specified as a duration (e.g., + `5ms`, `10ms`). type: string x-kubernetes-validations: - message: must be a valid duration greater than 1ms @@ -6035,8 +6047,8 @@ spec: nullable: true type: integer minConcurrency: - description: The concurrency limit set while measuring - the minRTT. + description: The concurrency limit pinned during the + minRTT measurement window. maximum: 4294967295 minimum: 0 nullable: true diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index afecd0f1f6..000262747a 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -318,13 +318,26 @@ const ConnectionPoolSettings_HTTPSettings_UPGRADE ConnectionPoolSettings_HTTPSet // ``` type OutlierDetection = v1alpha3.OutlierDetection -// Adaptive concurrency settings for dynamically adjusting the allowed number of -// outstanding requests based on sampled latencies. See Envoy's +// Configures automatic concurrency limits for requests to an upstream service. +// When enabled, the sidecar proxy will dynamically calculate and enforce a +// maximum number of outstanding requests allowed to the destination based on +// periodic latency sampling. If the measured latency increases relative to the +// baseline (minRTT), the concurrency limit is reduced; if latency remains +// stable, the limit is gradually increased. Requests that exceed the current +// concurrency limit are immediately rejected with the configured HTTP status +// code (default 503) without being forwarded to the upstream. +// +// This is useful for protecting upstream services from being overwhelmed during +// load spikes or degraded performance, without requiring operators to manually +// set fixed concurrency thresholds. +// +// See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. // -// The following example configures adaptive concurrency for the my-service -// service with a gradient controller: +// The following example enables adaptive concurrency limiting for my-service, +// using the gradient controller to automatically adjust the concurrency limit +// based on latency measurements taken every 60 seconds: // // ```yaml // apiVersion: networking.istio.io/v1 @@ -378,9 +391,23 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = // reduce overhead but may react slower to changes in upstream performance. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval -// A fixed value for the minRTT. Must be positive. +// A fixed baseline round-trip time (minRTT) for the upstream, specified +// as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the +// gradient controller "assume the upstream responds in this time under +// ideal conditions" and skips dynamic sampling entirely. +// +// The gradient algorithm uses minRTT as the reference in its formula: +// +// gradient = (minRTT + buffer) / sampleRTT +// new_limit = old_limit × gradient + headroom +// +// where buffer = minRTT × buffer_percent, and headroom = sqrt(limit). +// So if measured latency rises above minRTT + buffer, the concurrency +// limit is reduced; if it stays near minRTT, the limit grows. +// // Use this when the baseline latency of the upstream is well-known and -// stable, to avoid the periodic low-concurrency measurement windows. +// stable, to avoid the periodic low-concurrency measurement windows +// that dynamic sampling (`interval`) requires. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue // Gradient concurrency control will be used. diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index aa10616cdb..2ad231cab3 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -1310,13 +1310,26 @@ func (x *OutlierDetection) GetMinHealthPercent() int32 { return 0 } -// Adaptive concurrency settings for dynamically adjusting the allowed number of -// outstanding requests based on sampled latencies. See Envoy's +// Configures automatic concurrency limits for requests to an upstream service. +// When enabled, the sidecar proxy will dynamically calculate and enforce a +// maximum number of outstanding requests allowed to the destination based on +// periodic latency sampling. If the measured latency increases relative to the +// baseline (minRTT), the concurrency limit is reduced; if latency remains +// stable, the limit is gradually increased. Requests that exceed the current +// concurrency limit are immediately rejected with the configured HTTP status +// code (default 503) without being forwarded to the upstream. +// +// This is useful for protecting upstream services from being overwhelmed during +// load spikes or degraded performance, without requiring operators to manually +// set fixed concurrency thresholds. +// +// See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. // -// The following example configures adaptive concurrency for the my-service -// service with a gradient controller: +// The following example enables adaptive concurrency limiting for my-service, +// using the gradient controller to automatically adjust the concurrency limit +// based on latency measurements taken every 60 seconds: // // ```yaml // apiVersion: networking.istio.io/v1 @@ -2901,24 +2914,20 @@ type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationPar state protoimpl.MessageState `protogen:"open.v1"` // The allowed upper-bound on the calculated concurrency limit. Defaults to 1000. // - // This acts as a safety cap on the gradient algorithm's output, the algorithm + // This acts as a safety cap on the gradient algorithm's output. The algorithm // dynamically adjusts the concurrency limit based on measured latency (via the // gradient formula: new_limit = old_limit * gradient + headroom), but the result - // is clamped to [min_concurrency, max_concurrency_limit] before being applied. - // The gradient calculation itself is not influenced by this value. + // will never exceed this value. The gradient calculation itself is not influenced + // by this cap. // // In most cases the default of 1000 is sufficient, since the algorithm will // self-regulate well below this ceiling based on observed latencies. Consider // lowering it only if you know the upstream's maximum sustainable concurrency // and want a hard safety net beyond the algorithm's own backoff behavior. // Setting this too low may prevent the algorithm from reaching the upstream's - // true capacity. Note that this limit applies per filter config instance - // (typically one per Envoy process per listener), so the aggregate concurrency - // across N Envoy instances can reach up to N * max_concurrency_limit. + // true capacity. // - // Overridable at runtime via - // adaptive_concurrency.gradient_controller.max_concurrency_limit. - // Monitor the concurrency_limit gauge to observe where the algorithm settles + // Monitor the `concurrency_limit` gauge to observe where the algorithm settles // under normal load. MaxConcurrencyLimit *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=max_concurrency_limit,json=maxConcurrencyLimit,proto3" json:"max_concurrency_limit,omitempty"` // The period of time samples are taken to recalculate the concurrency limit. @@ -2996,7 +3005,23 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams st // This is recommended to prevent all hosts in a cluster from // being in a minRTT calculation window at the same time. Jitter *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` - // The concurrency limit set while measuring the minRTT. Defaults to 3. + // The concurrency limit pinned during the minRTT measurement window. + // Defaults to 3. + // + // During the measurement window, the filter drops the concurrency limit to + // this value to measure latency under near-idle conditions. Requests that + // exceed this limit during the window are rejected with the configured + // status code (default 503). The window lasts until `request_count` samples + // are collected. + // + // To mitigate 503s during measurement windows: + // - Use `jitter` to stagger measurement windows across hosts so they + // don't all enter the window simultaneously. + // - Configure retries (with the `previous_hosts` retry predicate) so + // rejected requests are retried on a different host not currently in + // a measurement window. + // - Alternatively, use `fixed_value` instead of `interval` to skip + // dynamic measurement entirely if the baseline latency is known. MinConcurrency *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` // Amount added to the measured minRTT to add stability to the concurrency limit // during natural variability in latency. This is expressed as a percentage of the @@ -3106,9 +3131,23 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_In } type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue struct { - // A fixed value for the minRTT. Must be positive. + // A fixed baseline round-trip time (minRTT) for the upstream, specified + // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the + // gradient controller "assume the upstream responds in this time under + // ideal conditions" and skips dynamic sampling entirely. + // + // The gradient algorithm uses minRTT as the reference in its formula: + // + // gradient = (minRTT + buffer) / sampleRTT + // new_limit = old_limit × gradient + headroom + // + // where buffer = minRTT × buffer_percent, and headroom = sqrt(limit). + // So if measured latency rises above minRTT + buffer, the concurrency + // limit is reduced; if it stays near minRTT, the limit grows. + // // Use this when the baseline latency of the upstream is well-known and - // stable, to avoid the periodic low-concurrency measurement windows. + // stable, to avoid the periodic low-concurrency measurement windows + // that dynamic sampling (`interval`) requires. FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3,oneof"` } diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index af5c54de57..e6c6e86c87 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -1504,12 +1504,23 @@

OutlierDetection

AdaptiveConcurrency

-

Adaptive concurrency settings for dynamically adjusting the allowed number of -outstanding requests based on sampled latencies. See Envoy’s +

Configures automatic concurrency limits for requests to an upstream service. +When enabled, the sidecar proxy will dynamically calculate and enforce a +maximum number of outstanding requests allowed to the destination based on +periodic latency sampling. If the measured latency increases relative to the +baseline (minRTT), the concurrency limit is reduced; if latency remains +stable, the limit is gradually increased. Requests that exceed the current +concurrency limit are immediately rejected with the configured HTTP status +code (default 503) without being forwarded to the upstream.

+

This is useful for protecting upstream services from being overwhelmed during +load spikes or degraded performance, without requiring operators to manually +set fixed concurrency thresholds.

+

See Envoy’s adaptive concurrency filter for more details.

-

The following example configures adaptive concurrency for the my-service -service with a gradient controller:

+

The following example enables adaptive concurrency limiting for my-service, +using the gradient controller to automatically adjust the concurrency limit +based on latency measurements taken every 60 seconds:

apiVersion: networking.istio.io/v1
 kind: DestinationRule
 metadata:
@@ -1630,22 +1641,18 @@ 

Duration (oneof)

@@ -1732,7 +1749,23 @@

UInt32Value

diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index ed3f9caace..508a98be9e 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -318,13 +318,26 @@ const ConnectionPoolSettings_HTTPSettings_UPGRADE ConnectionPoolSettings_HTTPSet // ``` type OutlierDetection = v1alpha3.OutlierDetection -// Adaptive concurrency settings for dynamically adjusting the allowed number of -// outstanding requests based on sampled latencies. See Envoy's +// Configures automatic concurrency limits for requests to an upstream service. +// When enabled, the sidecar proxy will dynamically calculate and enforce a +// maximum number of outstanding requests allowed to the destination based on +// periodic latency sampling. If the measured latency increases relative to the +// baseline (minRTT), the concurrency limit is reduced; if latency remains +// stable, the limit is gradually increased. Requests that exceed the current +// concurrency limit are immediately rejected with the configured HTTP status +// code (default 503) without being forwarded to the upstream. +// +// This is useful for protecting upstream services from being overwhelmed during +// load spikes or degraded performance, without requiring operators to manually +// set fixed concurrency thresholds. +// +// See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. // -// The following example configures adaptive concurrency for the my-service -// service with a gradient controller: +// The following example enables adaptive concurrency limiting for my-service, +// using the gradient controller to automatically adjust the concurrency limit +// based on latency measurements taken every 60 seconds: // // ```yaml // apiVersion: networking.istio.io/v1 @@ -378,9 +391,23 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = // reduce overhead but may react slower to changes in upstream performance. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval -// A fixed value for the minRTT. Must be positive. +// A fixed baseline round-trip time (minRTT) for the upstream, specified +// as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the +// gradient controller "assume the upstream responds in this time under +// ideal conditions" and skips dynamic sampling entirely. +// +// The gradient algorithm uses minRTT as the reference in its formula: +// +// gradient = (minRTT + buffer) / sampleRTT +// new_limit = old_limit × gradient + headroom +// +// where buffer = minRTT × buffer_percent, and headroom = sqrt(limit). +// So if measured latency rises above minRTT + buffer, the concurrency +// limit is reduced; if it stays near minRTT, the limit grows. +// // Use this when the baseline latency of the upstream is well-known and -// stable, to avoid the periodic low-concurrency measurement windows. +// stable, to avoid the periodic low-concurrency measurement windows +// that dynamic sampling (`interval`) requires. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue // Gradient concurrency control will be used. From 0cf9792504a662f61c6f589f0ec3ee4392da57a3 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Mon, 23 Mar 2026 18:27:10 -0700 Subject: [PATCH 10/11] Addressing the review comments --- networking/v1alpha3/destination_rule.pb.go | 3 +-- networking/v1alpha3/destination_rule.pb.html | 3 +-- networking/v1alpha3/destination_rule.proto | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 2ad231cab3..5a32e1ae11 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -558,8 +558,7 @@ type TrafficPolicy struct { // Specifies a limit on concurrent retries in relation to the number of active requests. RetryBudget *TrafficPolicy_RetryBudget `protobuf:"bytes,8,opt,name=retry_budget,json=retryBudget,proto3" json:"retry_budget,omitempty"` // Adaptive concurrency settings for dynamically adjusting the allowed number of - // outstanding requests based on sampled latencies. This enables the Envoy - // adaptive concurrency filter for the destination. + // outstanding requests based on sampled latencies. // // Note: This operates independently from circuit breaker thresholds (e.g. // max_connections). Both mechanisms can reject requests, but they act at diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index e6c6e86c87..eb869639f4 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -284,8 +284,7 @@

TrafficPolicy

+ - - + + + + +
FieldDescription
+

The time interval between recalculating the minimum request round-trip time. +Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled.

+ +
+

The fixed value for the minRTT. This value is used when minRTT is not sampled +dynamically. If dynamic sampling of the minRTT is disabled (i.e. interval is +set to zero), this field must be set.

+ +
+

The number of requests to aggregate/sample during the minRTT recalculation +window before updating. Defaults to 50.

+ +
+

Randomized time delta that will be introduced to the start of the minRTT +calculation window. This is represented as a percentage of the interval duration. +Defaults to 15%. This is recommended to prevent all hosts in a cluster from +being in a minRTT calculation window at the same time.

+ +
+

The concurrency limit set while measuring the minRTT. Defaults to 3.

+ +
+

Amount added to the measured minRTT to add stability to the concurrency limit +during natural variability in latency. This is expressed as a percentage of the +measured value and can be adjusted to allow more or less tolerance to the sampled +latency values. Defaults to 25%.

+

Gradient concurrency control will be used.

-
-
bool
-
-

If set to false, the adaptive concurrency filter will operate as a pass-through -filter. If unspecified, the filter will be enabled.

-

The percentile to use when summarizing aggregated samples. Defaults to p50. -Value should be between 0 and 100.

+Value must be in the range [0, 100].

The time interval between recalculating the minimum request round-trip time. -Has to be positive. If set to zero, dynamic sampling of the minRTT is disabled.

+Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT +is disabled and fixed_value must be provided instead. +There is no default — one of interval or fixed_value must be specified.

+

When dynamic sampling is enabled (interval > 0), the controller periodically +enters a low-concurrency measurement window (pinned to min_concurrency) to +re-measure the baseline latency. During this window, throughput is temporarily +reduced, so longer intervals reduce overhead but may react slower to changes +in upstream performance.

-

The fixed value for the minRTT. This value is used when minRTT is not sampled -dynamically. If dynamic sampling of the minRTT is disabled (i.e. interval is -set to zero), this field must be set.

+

The fixed value for the minRTT, used when dynamic sampling is disabled +(i.e. interval is unset or zero). Must be positive when set. +This field is mutually exclusive with a positive interval — if interval +is set, fixed_value is ignored and the minRTT is sampled dynamically. +Use this when the baseline latency of the upstream is well-known and stable, +to avoid the periodic low-concurrency measurement windows.

Randomized time delta that will be introduced to the start of the minRTT calculation window. This is represented as a percentage of the interval duration. -Defaults to 15%. This is recommended to prevent all hosts in a cluster from +Defaults to 15%. Value must be in the range [0, 100]. +This is recommended to prevent all hosts in a cluster from being in a minRTT calculation window at the same time.

Amount added to the measured minRTT to add stability to the concurrency limit during natural variability in latency. This is expressed as a percentage of the measured value and can be adjusted to allow more or less tolerance to the sampled -latency values. Defaults to 25%.

+latency values. Defaults to 25%. Value must be in the range [0, 100].

-

The time interval between recalculating the minimum request round-trip time. -Must be >= 1ms when set. If unset or zero, dynamic sampling of the minRTT -is disabled and fixed_value must be provided instead. -There is no default — one of interval or fixed_value must be specified.

-

When dynamic sampling is enabled (interval > 0), the controller periodically -enters a low-concurrency measurement window (pinned to min_concurrency) to -re-measure the baseline latency. During this window, throughput is temporarily -reduced, so longer intervals reduce overhead but may react slower to changes -in upstream performance.

+

The time interval between recalculating the minimum request round-trip +time. Must be >= 1ms.

+

When set, the controller periodically enters a low-concurrency measurement +window (pinned to min_concurrency) to re-measure the baseline latency. +During this window, throughput is temporarily reduced, so longer intervals +reduce overhead but may react slower to changes in upstream performance.

-

The fixed value for the minRTT, used when dynamic sampling is disabled -(i.e. interval is unset or zero). Must be positive when set. -This field is mutually exclusive with a positive interval — if interval -is set, fixed_value is ignored and the minRTT is sampled dynamically. -Use this when the baseline latency of the upstream is well-known and stable, -to avoid the periodic low-concurrency measurement windows.

+

A fixed value for the minRTT. Must be positive. +Use this when the baseline latency of the upstream is well-known and +stable, to avoid the periodic low-concurrency measurement windows.

-

A fixed value for the minRTT. Must be positive. -Use this when the baseline latency of the upstream is well-known and -stable, to avoid the periodic low-concurrency measurement windows.

+

A fixed baseline round-trip time (minRTT) for the upstream, specified +as a duration (e.g., 5ms, 10ms). Must be positive. This tells the +gradient controller “assume the upstream responds in this time under +ideal conditions” and skips dynamic sampling entirely.

+

The gradient algorithm uses minRTT as the reference in its formula: +gradient = (minRTT + buffer) / sampleRTT +new_limit = old_limit × gradient + headroom +where buffer = minRTT × buffer_percent, and headroom = sqrt(limit). +So if measured latency rises above minRTT + buffer, the concurrency +limit is reduced; if it stays near minRTT, the limit grows.

+

Use this when the baseline latency of the upstream is well-known and +stable, to avoid the periodic low-concurrency measurement windows +that dynamic sampling (interval) requires.

-

The concurrency limit set while measuring the minRTT. Defaults to 3.

+

The concurrency limit pinned during the minRTT measurement window. +Defaults to 3.

+

During the measurement window, the filter drops the concurrency limit to +this value to measure latency under near-idle conditions. Requests that +exceed this limit during the window are rejected with the configured +status code (default 503). The window lasts until request_count samples +are collected.

+

To mitigate 503s during measurement windows:

+
    +
  • Use jitter to stagger measurement windows across hosts so they +don’t all enter the window simultaneously.
  • +
  • Configure retries (with the previous_hosts retry predicate) so +rejected requests are retried on a different host not currently in +a measurement window.
  • +
  • Alternatively, use fixed_value instead of interval to skip +dynamic measurement entirely if the baseline latency is known.
  • +

Adaptive concurrency settings for dynamically adjusting the allowed number of -outstanding requests based on sampled latencies. This enables the Envoy -adaptive concurrency filter for the destination.

+outstanding requests based on sampled latencies.

Note: This operates independently from circuit breaker thresholds (e.g. max_connections). Both mechanisms can reject requests, but they act at different layers: adaptive concurrency limits outstanding requests at diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index eade9d94e0..285433060f 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -309,8 +309,7 @@ message TrafficPolicy { RetryBudget retry_budget = 8; // Adaptive concurrency settings for dynamically adjusting the allowed number of - // outstanding requests based on sampled latencies. This enables the Envoy - // adaptive concurrency filter for the destination. + // outstanding requests based on sampled latencies. // // Note: This operates independently from circuit breaker thresholds (e.g. // max_connections). Both mechanisms can reject requests, but they act at From 0be5ca2dad86d47e90309c1a6458d790542e3e77 Mon Sep 17 00:00:00 2001 From: Prashanth Josyula Date: Wed, 25 Mar 2026 23:05:36 -0700 Subject: [PATCH 11/11] addressing review comments --- kubernetes/customresourcedefinitions.gen.yaml | 456 ++++++++++-------- networking/v1/destination_rule_alias.gen.go | 46 +- networking/v1alpha3/destination_rule.pb.go | 374 ++++++++------ networking/v1alpha3/destination_rule.pb.html | 135 ++++-- networking/v1alpha3/destination_rule.proto | 122 +++-- .../v1alpha3/destination_rule_deepcopy.gen.go | 21 + .../v1alpha3/destination_rule_json.gen.go | 11 + .../v1beta1/destination_rule_alias.gen.go | 46 +- 8 files changed, 735 insertions(+), 476 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 244e696e43..2d01cac38f 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -482,13 +482,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT @@ -498,7 +498,44 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT + by entering a low-concurrency measurement + window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that + will be introduced to the start of the + minRTT calculation window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned + during the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window + before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -507,37 +544,6 @@ spec: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will - be introduced to the start of the minRTT calculation - window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during - the minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before - updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing @@ -1542,13 +1548,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT to @@ -1558,7 +1564,43 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT by entering + a low-concurrency measurement window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be + introduced to the start of the minRTT calculation + window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned during + the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -1566,34 +1608,6 @@ spec: x-kubernetes-validations: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will be introduced - to the start of the minRTT calculation window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during the - minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing aggregated @@ -2715,13 +2729,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT @@ -2731,7 +2745,44 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT + by entering a low-concurrency measurement + window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that + will be introduced to the start of the + minRTT calculation window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned + during the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window + before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -2740,37 +2791,6 @@ spec: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will - be introduced to the start of the minRTT calculation - window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during - the minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before - updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing @@ -3775,13 +3795,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT to @@ -3791,7 +3811,43 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT by entering + a low-concurrency measurement window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be + introduced to the start of the minRTT calculation + window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned during + the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -3799,34 +3855,6 @@ spec: x-kubernetes-validations: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will be introduced - to the start of the minRTT calculation window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during the - minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing aggregated @@ -4948,13 +4976,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT @@ -4964,7 +4992,44 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT + by entering a low-concurrency measurement + window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that + will be introduced to the start of the + minRTT calculation window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned + during the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window + before updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -4973,37 +5038,6 @@ spec: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will - be introduced to the start of the minRTT calculation - window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during - the minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before - updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing @@ -6008,13 +6042,13 @@ spec: - not: anyOf: - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency - required: - - interval + - dynamicSampling - required: - - fixedValue + - fixedLatency properties: buffer: description: Amount added to the measured minRTT to @@ -6024,7 +6058,43 @@ spec: minimum: 0 nullable: true type: integer - fixedValue: + dynamicSampling: + description: Periodically sample the minRTT by entering + a low-concurrency measurement window. + properties: + interval: + description: The time interval between recalculating + the minimum request round-trip time. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + jitter: + description: Randomized time delta that will be + introduced to the start of the minRTT calculation + window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + minConcurrency: + description: The concurrency limit pinned during + the minRTT measurement window. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + requestCount: + description: The number of requests to aggregate/sample + during the minRTT recalculation window before + updating. + maximum: 4294967295 + minimum: 0 + nullable: true + type: integer + type: object + fixedLatency: description: A fixed baseline round-trip time (minRTT) for the upstream, specified as a duration (e.g., `5ms`, `10ms`). @@ -6032,34 +6102,6 @@ spec: x-kubernetes-validations: - message: must be a valid duration greater than 1ms rule: duration(self) >= duration('1ms') - interval: - description: The time interval between recalculating - the minimum request round-trip time. - type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') - jitter: - description: Randomized time delta that will be introduced - to the start of the minRTT calculation window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - minConcurrency: - description: The concurrency limit pinned during the - minRTT measurement window. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer - requestCount: - description: The number of requests to aggregate/sample - during the minRTT recalculation window before updating. - maximum: 4294967295 - minimum: 0 - nullable: true - type: integer type: object sampleAggregatePercentile: description: The percentile to use when summarizing aggregated diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 000262747a..99c08e14d9 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -331,6 +331,21 @@ type OutlierDetection = v1alpha3.OutlierDetection // load spikes or degraded performance, without requiring operators to manually // set fixed concurrency thresholds. // +// **Important:** When using dynamic sampling (`dynamic_sampling`), the controller +// periodically enters a minRTT measurement window where the concurrency limit +// drops to `min_concurrency` (default 3). During this window, requests exceeding +// that limit are rejected with 503. This can cause a noticeable spike in errors, +// especially under high traffic. To mitigate this: +// - Enable client-side retries for 503s, ideally with the `previous_hosts` +// retry predicate so rejected requests are retried on a different host +// that is not in a measurement window. +// - Use `jitter` to stagger measurement windows across hosts. +// - Consider using `fixed_latency` instead of `dynamic_sampling` if the +// upstream's baseline latency is well-known and stable. +// +// See https://github.com/envoyproxy/envoy/issues/18152 for a real-world +// example of 503s during minRTT calculation windows. +// // See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. @@ -357,10 +372,11 @@ type OutlierDetection = v1alpha3.OutlierDetection // maxConcurrencyLimit: 1000 // concurrencyUpdateInterval: 100ms // minRttCalcParams: -// interval: 60s -// requestCount: 50 -// jitter: 10 -// minConcurrency: 3 +// dynamicSampling: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 // buffer: 25 // concurrencyLimitExceededStatus: 503 // @@ -376,20 +392,20 @@ type AdaptiveConcurrency_GradientControllerConfig = v1alpha3.AdaptiveConcurrency // from sampled request latencies. type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams -// Parameters controlling the periodic minRTT recalculation. +// Parameters controlling how the minRTT (baseline latency) is determined. // The minRTT is periodically measured by allowing only a very low outstanding // request count to an upstream cluster and measuring the latency under // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams -// The time interval between recalculating the minimum request round-trip -// time. Must be >= 1ms. -// -// When set, the controller periodically enters a low-concurrency measurement -// window (pinned to `min_concurrency`) to re-measure the baseline latency. -// During this window, throughput is temporarily reduced, so longer intervals -// reduce overhead but may react slower to changes in upstream performance. -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval +// Parameters for dynamically sampling the minRTT by periodically entering +// a low-concurrency measurement window. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling + +// Periodically sample the minRTT by entering a low-concurrency +// measurement window. Use this when the upstream's baseline latency +// may change over time. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ // A fixed baseline round-trip time (minRTT) for the upstream, specified // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the @@ -407,8 +423,8 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_In // // Use this when the baseline latency of the upstream is well-known and // stable, to avoid the periodic low-concurrency measurement windows -// that dynamic sampling (`interval`) requires. -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue +// that dynamic sampling requires. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency // Gradient concurrency control will be used. type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 5a32e1ae11..8d88f526aa 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -560,7 +560,12 @@ type TrafficPolicy struct { // Adaptive concurrency settings for dynamically adjusting the allowed number of // outstanding requests based on sampled latencies. // - // Note: This operates independently from circuit breaker thresholds (e.g. + // Note: This applies only to HTTP/1.1 and HTTP/2 unary request-response + // traffic and is enforced on the server-side (inbound) proxy. It does not + // apply to TCP connections, gRPC streaming, or WebSocket connections, since + // the filter relies on measuring individual request round-trip latencies. + // + // This operates independently from circuit breaker thresholds (e.g. // max_connections). Both mechanisms can reject requests, but they act at // different layers: adaptive concurrency limits outstanding requests at // the HTTP filter level before routing, while circuit breakers limit @@ -1322,6 +1327,21 @@ func (x *OutlierDetection) GetMinHealthPercent() int32 { // load spikes or degraded performance, without requiring operators to manually // set fixed concurrency thresholds. // +// **Important:** When using dynamic sampling (`dynamic_sampling`), the controller +// periodically enters a minRTT measurement window where the concurrency limit +// drops to `min_concurrency` (default 3). During this window, requests exceeding +// that limit are rejected with 503. This can cause a noticeable spike in errors, +// especially under high traffic. To mitigate this: +// - Enable client-side retries for 503s, ideally with the `previous_hosts` +// retry predicate so rejected requests are retried on a different host +// that is not in a measurement window. +// - Use `jitter` to stagger measurement windows across hosts. +// - Consider using `fixed_latency` instead of `dynamic_sampling` if the +// upstream's baseline latency is well-known and stable. +// +// See https://github.com/envoyproxy/envoy/issues/18152 for a real-world +// example of 503s during minRTT calculation windows. +// // See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. @@ -1348,10 +1368,11 @@ func (x *OutlierDetection) GetMinHealthPercent() int32 { // maxConcurrencyLimit: 1000 // concurrencyUpdateInterval: 100ms // minRttCalcParams: -// interval: 60s -// requestCount: 50 -// jitter: 10 -// minConcurrency: 3 +// dynamicSampling: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 // buffer: 25 // concurrencyLimitExceededStatus: 503 // @@ -2981,52 +3002,26 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculatio return nil } -// Parameters controlling the periodic minRTT recalculation. +// Parameters controlling how the minRTT (baseline latency) is determined. // The minRTT is periodically measured by allowing only a very low outstanding // request count to an upstream cluster and measuring the latency under // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams struct { state protoimpl.MessageState `protogen:"open.v1"` - // Exactly one of `interval` or `fixed_value` must be set to determine - // how the minRTT is obtained. + // Exactly one of `dynamic_sampling` or `fixed_latency` must be set. // // Types that are valid to be assigned to MinRttSource: // - // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval - // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue + // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ + // *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency MinRttSource isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource `protobuf_oneof:"min_rtt_source"` - // The number of requests to aggregate/sample during the minRTT recalculation - // window before updating. Defaults to 50. - RequestCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` - // Randomized time delta that will be introduced to the start of the minRTT - // calculation window. This is represented as a percentage of the interval duration. - // Defaults to 15%. Value must be in the range [0, 100]. - // This is recommended to prevent all hosts in a cluster from - // being in a minRTT calculation window at the same time. - Jitter *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` - // The concurrency limit pinned during the minRTT measurement window. - // Defaults to 3. - // - // During the measurement window, the filter drops the concurrency limit to - // this value to measure latency under near-idle conditions. Requests that - // exceed this limit during the window are rejected with the configured - // status code (default 503). The window lasts until `request_count` samples - // are collected. - // - // To mitigate 503s during measurement windows: - // - Use `jitter` to stagger measurement windows across hosts so they - // don't all enter the window simultaneously. - // - Configure retries (with the `previous_hosts` retry predicate) so - // rejected requests are retried on a different host not currently in - // a measurement window. - // - Alternatively, use `fixed_value` instead of `interval` to skip - // dynamic measurement entirely if the baseline latency is known. - MinConcurrency *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` - // Amount added to the measured minRTT to add stability to the concurrency limit - // during natural variability in latency. This is expressed as a percentage of the - // measured value and can be adjusted to allow more or less tolerance to the sampled - // latency values. Defaults to 25%. Value must be in the range [0, 100]. - Buffer *wrappers.UInt32Value `protobuf:"bytes,5,opt,name=buffer,proto3" json:"buffer,omitempty"` + // Amount added to the measured minRTT to add stability to the concurrency + // limit during natural variability in latency. This is expressed as a + // percentage of the measured value and can be adjusted to allow more or + // less tolerance to the sampled latency values. Defaults to 25%. + // Value must be in the range [0, 100]. + // This applies regardless of whether minRTT is dynamically sampled or fixed. + Buffer *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=buffer,proto3" json:"buffer,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -3068,45 +3063,24 @@ func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParam return nil } -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetInterval() *duration.Duration { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetDynamicSampling() *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling { if x != nil { - if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval); ok { - return x.Interval + if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_); ok { + return x.DynamicSampling } } return nil } -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetFixedValue() *duration.Duration { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetFixedLatency() *duration.Duration { if x != nil { - if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue); ok { - return x.FixedValue + if x, ok := x.MinRttSource.(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency); ok { + return x.FixedLatency } } return nil } -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetRequestCount() *wrappers.UInt32Value { - if x != nil { - return x.RequestCount - } - return nil -} - -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetJitter() *wrappers.UInt32Value { - if x != nil { - return x.Jitter - } - return nil -} - -func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetMinConcurrency() *wrappers.UInt32Value { - if x != nil { - return x.MinConcurrency - } - return nil -} - func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams) GetBuffer() *wrappers.UInt32Value { if x != nil { return x.Buffer @@ -3118,18 +3092,14 @@ type isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_ isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() } -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval struct { - // The time interval between recalculating the minimum request round-trip - // time. Must be >= 1ms. - // - // When set, the controller periodically enters a low-concurrency measurement - // window (pinned to `min_concurrency`) to re-measure the baseline latency. - // During this window, throughput is temporarily reduced, so longer intervals - // reduce overhead but may react slower to changes in upstream performance. - Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3,oneof"` +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ struct { + // Periodically sample the minRTT by entering a low-concurrency + // measurement window. Use this when the upstream's baseline latency + // may change over time. + DynamicSampling *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling `protobuf:"bytes,1,opt,name=dynamic_sampling,json=dynamicSampling,proto3,oneof"` } -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue struct { +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency struct { // A fixed baseline round-trip time (minRTT) for the upstream, specified // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the // gradient controller "assume the upstream responds in this time under @@ -3146,14 +3116,116 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Fi // // Use this when the baseline latency of the upstream is well-known and // stable, to avoid the periodic low-concurrency measurement windows - // that dynamic sampling (`interval`) requires. - FixedValue *duration.Duration `protobuf:"bytes,6,opt,name=fixed_value,json=fixedValue,proto3,oneof"` + // that dynamic sampling requires. + FixedLatency *duration.Duration `protobuf:"bytes,2,opt,name=fixed_latency,json=fixedLatency,proto3,oneof"` +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +} + +// Parameters for dynamically sampling the minRTT by periodically entering +// a low-concurrency measurement window. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The time interval between recalculating the minimum request round-trip + // time. Must be >= 1ms. + // + // When set, the controller periodically enters a low-concurrency measurement + // window (pinned to `min_concurrency`) to re-measure the baseline latency. + // During this window, throughput is temporarily reduced, so longer intervals + // reduce overhead but may react slower to changes in upstream performance. + Interval *duration.Duration `protobuf:"bytes,1,opt,name=interval,proto3" json:"interval,omitempty"` + // The number of requests to aggregate/sample during the minRTT + // recalculation window before updating. Defaults to 50. + RequestCount *wrappers.UInt32Value `protobuf:"bytes,2,opt,name=request_count,json=requestCount,proto3" json:"request_count,omitempty"` + // Randomized time delta that will be introduced to the start of the minRTT + // calculation window. This is represented as a percentage of the interval + // duration. Defaults to 15%. Value must be in the range [0, 100]. + // This is recommended to prevent all hosts in a cluster from + // being in a minRTT calculation window at the same time. + Jitter *wrappers.UInt32Value `protobuf:"bytes,3,opt,name=jitter,proto3" json:"jitter,omitempty"` + // The concurrency limit pinned during the minRTT measurement window. + // Defaults to 3. + // + // During the measurement window, the filter drops the concurrency limit to + // this value to measure latency under near-idle conditions. Requests that + // exceed this limit during the window are rejected with the configured + // status code (default 503). The window lasts until `request_count` samples + // are collected. + // + // To mitigate 503s during measurement windows: + // - Use `jitter` to stagger measurement windows across hosts so they + // don't all enter the window simultaneously. + // - Configure retries (with the `previous_hosts` retry predicate) so + // rejected requests are retried on a different host not currently in + // a measurement window. + // - Alternatively, use `fixed_latency` instead to skip dynamic + // measurement entirely if the baseline latency is known. + MinConcurrency *wrappers.UInt32Value `protobuf:"bytes,4,opt,name=min_concurrency,json=minConcurrency,proto3" json:"min_concurrency,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } -func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) Reset() { + *x = AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } -func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue) isAdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_MinRttSource() { +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) ProtoMessage() { +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling.ProtoReflect.Descriptor instead. +func (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{7, 0, 1, 0} +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) GetInterval() *duration.Duration { + if x != nil { + return x.Interval + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) GetRequestCount() *wrappers.UInt32Value { + if x != nil { + return x.RequestCount + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) GetJitter() *wrappers.UInt32Value { + if x != nil { + return x.Jitter + } + return nil +} + +func (x *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) GetMinConcurrency() *wrappers.UInt32Value { + if x != nil { + return x.MinConcurrency + } + return nil } // Describes how traffic originating in the 'from' zone or sub-zone is @@ -3180,7 +3252,7 @@ type LocalityLoadBalancerSetting_Distribute struct { func (x *LocalityLoadBalancerSetting_Distribute) Reset() { *x = LocalityLoadBalancerSetting_Distribute{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3192,7 +3264,7 @@ func (x *LocalityLoadBalancerSetting_Distribute) String() string { func (*LocalityLoadBalancerSetting_Distribute) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Distribute) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3242,7 +3314,7 @@ type LocalityLoadBalancerSetting_Failover struct { func (x *LocalityLoadBalancerSetting_Failover) Reset() { *x = LocalityLoadBalancerSetting_Failover{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3254,7 +3326,7 @@ func (x *LocalityLoadBalancerSetting_Failover) String() string { func (*LocalityLoadBalancerSetting_Failover) ProtoMessage() {} func (x *LocalityLoadBalancerSetting_Failover) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[27] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3419,26 +3491,26 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\binterval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12G\n" + "\x12base_ejection_time\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x10baseEjectionTime\x120\n" + "\x14max_ejection_percent\x18\x04 \x01(\x05R\x12maxEjectionPercent\x12,\n" + - "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xc5\n" + - "\n" + + "\x12min_health_percent\x18\x05 \x01(\x05R\x10minHealthPercent\"\xfe\v\n" + "\x13AdaptiveConcurrency\x12\x87\x01\n" + "\x1agradient_controller_config\x18\x01 \x01(\v2G.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfigH\x00R\x18gradientControllerConfig\x12I\n" + - "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xb7\b\n" + + "!concurrency_limit_exceeded_status\x18\x03 \x01(\rR\x1econcurrencyLimitExceededStatus\x1a\xf0\t\n" + "\x18GradientControllerConfig\x12\\\n" + "\x1bsample_aggregate_percentile\x18\x01 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x19sampleAggregatePercentile\x12\xa9\x01\n" + "\x18concurrency_limit_params\x18\x02 \x01(\v2i.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParamsB\x04\xe2A\x01\x02R\x16concurrencyLimitParams\x12\x98\x01\n" + "\x13min_rtt_calc_params\x18\x03 \x01(\v2c.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParamsB\x04\xe2A\x01\x02R\x10minRttCalcParams\x1a\xd6\x01\n" + "!ConcurrencyLimitCalculationParams\x12P\n" + "\x15max_concurrency_limit\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13maxConcurrencyLimit\x12_\n" + - "\x1bconcurrency_update_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x04\xe2A\x01\x02R\x19concurrencyUpdateInterval\x1a\x9c\x03\n" + - "\x1bMinimumRTTCalculationParams\x127\n" + - "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationH\x00R\binterval\x12<\n" + - "\vfixed_value\x18\x06 \x01(\v2\x19.google.protobuf.DurationH\x00R\n" + - "fixedValue\x12A\n" + + "\x1bconcurrency_update_interval\x18\x03 \x01(\v2\x19.google.protobuf.DurationB\x04\xe2A\x01\x02R\x19concurrencyUpdateInterval\x1a\xd5\x04\n" + + "\x1bMinimumRTTCalculationParams\x12\xa0\x01\n" + + "\x10dynamic_sampling\x18\x01 \x01(\v2s.istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSamplingH\x00R\x0fdynamicSampling\x12@\n" + + "\rfixed_latency\x18\x02 \x01(\v2\x19.google.protobuf.DurationH\x00R\ffixedLatency\x124\n" + + "\x06buffer\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06buffer\x1a\x88\x02\n" + + "\x0fDynamicSampling\x125\n" + + "\binterval\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\binterval\x12A\n" + "\rrequest_count\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\frequestCount\x124\n" + "\x06jitter\x18\x03 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06jitter\x12E\n" + - "\x0fmin_concurrency\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0eminConcurrency\x124\n" + - "\x06buffer\x18\x05 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x06bufferB\x10\n" + + "\x0fmin_concurrency\x18\x04 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x0eminConcurrencyB\x10\n" + "\x0emin_rtt_sourceB\x1f\n" + "\x1dconcurrency_controller_config\"\xe4\x03\n" + "\x11ClientTLSSettings\x12H\n" + @@ -3490,7 +3562,7 @@ func file_networking_v1alpha3_destination_rule_proto_rawDescGZIP() []byte { } var file_networking_v1alpha3_destination_rule_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_networking_v1alpha3_destination_rule_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (TrafficPolicy_ProxyProtocol_VERSION)(0), // 0: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION (LoadBalancerSettings_SimpleLB)(0), // 1: istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB @@ -3520,22 +3592,23 @@ var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (*ConnectionPoolSettings_HTTPSettings)(nil), // 25: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 26: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive (*AdaptiveConcurrency_GradientControllerConfig)(nil), // 27: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig - (*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams)(nil), // 28: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams - (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams)(nil), // 29: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams - (*LocalityLoadBalancerSetting_Distribute)(nil), // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - (*LocalityLoadBalancerSetting_Failover)(nil), // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - nil, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - (*v1beta1.WorkloadSelector)(nil), // 33: istio.type.v1beta1.WorkloadSelector - (*duration.Duration)(nil), // 34: google.protobuf.Duration - (*wrappers.DoubleValue)(nil), // 35: google.protobuf.DoubleValue - (*wrappers.UInt32Value)(nil), // 36: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 37: google.protobuf.BoolValue - (*PortSelector)(nil), // 38: istio.networking.v1alpha3.PortSelector + (*AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams)(nil), // 28: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams)(nil), // 29: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling)(nil), // 30: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling + (*LocalityLoadBalancerSetting_Distribute)(nil), // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + (*LocalityLoadBalancerSetting_Failover)(nil), // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + nil, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + (*v1beta1.WorkloadSelector)(nil), // 34: istio.type.v1beta1.WorkloadSelector + (*duration.Duration)(nil), // 35: google.protobuf.Duration + (*wrappers.DoubleValue)(nil), // 36: google.protobuf.DoubleValue + (*wrappers.UInt32Value)(nil), // 37: google.protobuf.UInt32Value + (*wrappers.BoolValue)(nil), // 38: google.protobuf.BoolValue + (*PortSelector)(nil), // 39: istio.networking.v1alpha3.PortSelector } var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 5, // 0: istio.networking.v1alpha3.DestinationRule.traffic_policy:type_name -> istio.networking.v1alpha3.TrafficPolicy 6, // 1: istio.networking.v1alpha3.DestinationRule.subsets:type_name -> istio.networking.v1alpha3.Subset - 33, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector + 34, // 2: istio.networking.v1alpha3.DestinationRule.workload_selector:type_name -> istio.type.v1beta1.WorkloadSelector 7, // 3: istio.networking.v1alpha3.TrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings 9, // 4: istio.networking.v1alpha3.TrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings 10, // 5: istio.networking.v1alpha3.TrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection @@ -3550,61 +3623,62 @@ var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 1, // 14: istio.networking.v1alpha3.LoadBalancerSettings.simple:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.SimpleLB 19, // 15: istio.networking.v1alpha3.LoadBalancerSettings.consistent_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB 13, // 16: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting - 34, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration + 35, // 17: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration 8, // 18: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration - 34, // 19: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration - 35, // 20: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue - 35, // 21: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue + 35, // 19: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration + 36, // 20: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue + 36, // 21: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue 24, // 22: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings 25, // 23: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings - 36, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value - 36, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value - 36, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value - 34, // 27: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration - 34, // 28: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration + 37, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value + 37, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value + 37, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value + 35, // 27: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration + 35, // 28: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration 27, // 29: istio.networking.v1alpha3.AdaptiveConcurrency.gradient_controller_config:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig 3, // 30: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode - 37, // 31: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue - 30, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - 31, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - 37, // 34: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue - 38, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector + 38, // 31: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue + 31, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + 32, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + 38, // 34: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue + 39, // 35: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector 7, // 36: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings 9, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings 10, // 38: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection 12, // 39: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings 0, // 40: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION - 35, // 41: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue + 36, // 41: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue 22, // 42: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 20, // 43: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash 21, // 44: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - 34, // 45: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration + 35, // 45: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration 23, // 46: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute - 34, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration + 35, // 47: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration 26, // 48: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - 34, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration - 34, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration - 34, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration + 35, // 49: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration + 35, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration + 35, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration 2, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy - 34, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration - 34, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration - 36, // 55: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.sample_aggregate_percentile:type_name -> google.protobuf.UInt32Value + 35, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration + 35, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration + 37, // 55: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.sample_aggregate_percentile:type_name -> google.protobuf.UInt32Value 28, // 56: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.concurrency_limit_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams 29, // 57: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.min_rtt_calc_params:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams - 36, // 58: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.max_concurrency_limit:type_name -> google.protobuf.UInt32Value - 34, // 59: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.concurrency_update_interval:type_name -> google.protobuf.Duration - 34, // 60: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.interval:type_name -> google.protobuf.Duration - 34, // 61: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.fixed_value:type_name -> google.protobuf.Duration - 36, // 62: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.request_count:type_name -> google.protobuf.UInt32Value - 36, // 63: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.jitter:type_name -> google.protobuf.UInt32Value - 36, // 64: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.min_concurrency:type_name -> google.protobuf.UInt32Value - 36, // 65: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> google.protobuf.UInt32Value - 32, // 66: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - 67, // [67:67] is the sub-list for method output_type - 67, // [67:67] is the sub-list for method input_type - 67, // [67:67] is the sub-list for extension type_name - 67, // [67:67] is the sub-list for extension extendee - 0, // [0:67] is the sub-list for field type_name + 37, // 58: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.max_concurrency_limit:type_name -> google.protobuf.UInt32Value + 35, // 59: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.ConcurrencyLimitCalculationParams.concurrency_update_interval:type_name -> google.protobuf.Duration + 30, // 60: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.dynamic_sampling:type_name -> istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling + 35, // 61: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.fixed_latency:type_name -> google.protobuf.Duration + 37, // 62: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.buffer:type_name -> google.protobuf.UInt32Value + 35, // 63: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling.interval:type_name -> google.protobuf.Duration + 37, // 64: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling.request_count:type_name -> google.protobuf.UInt32Value + 37, // 65: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling.jitter:type_name -> google.protobuf.UInt32Value + 37, // 66: istio.networking.v1alpha3.AdaptiveConcurrency.GradientControllerConfig.MinimumRTTCalculationParams.DynamicSampling.min_concurrency:type_name -> google.protobuf.UInt32Value + 33, // 67: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + 68, // [68:68] is the sub-list for method output_type + 68, // [68:68] is the sub-list for method input_type + 68, // [68:68] is the sub-list for extension type_name + 68, // [68:68] is the sub-list for extension extendee + 0, // [0:68] is the sub-list for field type_name } func init() { file_networking_v1alpha3_destination_rule_proto_init() } @@ -3629,8 +3703,8 @@ func file_networking_v1alpha3_destination_rule_proto_init() { (*LoadBalancerSettings_ConsistentHashLB_Maglev)(nil), } file_networking_v1alpha3_destination_rule_proto_msgTypes[25].OneofWrappers = []any{ - (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval)(nil), - (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue)(nil), + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_)(nil), + (*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -3638,7 +3712,7 @@ func file_networking_v1alpha3_destination_rule_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_networking_v1alpha3_destination_rule_proto_rawDesc), len(file_networking_v1alpha3_destination_rule_proto_rawDesc)), NumEnums: 4, - NumMessages: 29, + NumMessages: 30, NumExtensions: 0, NumServices: 0, }, diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index eb869639f4..142a724564 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -6,7 +6,7 @@ generator: protoc-gen-docs schema: istio.networking.v1alpha3.DestinationRule aliases: [/docs/reference/config/networking/v1alpha3/destination-rule] -number_of_entries: 32 +number_of_entries: 33 ---

DestinationRule defines policies that apply to traffic intended for a service after routing has occurred. These rules specify configuration @@ -285,7 +285,11 @@

TrafficPolicy

Adaptive concurrency settings for dynamically adjusting the allowed number of outstanding requests based on sampled latencies.

-

Note: This operates independently from circuit breaker thresholds (e.g. +

Note: This applies only to HTTP/1.1 and HTTP/2 unary request-response +traffic and is enforced on the server-side (inbound) proxy. It does not +apply to TCP connections, gRPC streaming, or WebSocket connections, since +the filter relies on measuring individual request round-trip latencies.

+

This operates independently from circuit breaker thresholds (e.g. max_connections). Both mechanisms can reject requests, but they act at different layers: adaptive concurrency limits outstanding requests at the HTTP filter level before routing, while circuit breakers limit @@ -1514,6 +1518,21 @@

AdaptiveConcurrency

This is useful for protecting upstream services from being overwhelmed during load spikes or degraded performance, without requiring operators to manually set fixed concurrency thresholds.

+

Important: When using dynamic sampling (dynamic_sampling), the controller +periodically enters a minRTT measurement window where the concurrency limit +drops to min_concurrency (default 3). During this window, requests exceeding +that limit are rejected with 503. This can cause a noticeable spike in errors, +especially under high traffic. To mitigate this:

+
    +
  • Enable client-side retries for 503s, ideally with the previous_hosts +retry predicate so rejected requests are retried on a different host +that is not in a measurement window.
  • +
  • Use jitter to stagger measurement windows across hosts.
  • +
  • Consider using fixed_latency instead of dynamic_sampling if the +upstream’s baseline latency is well-known and stable. +See https://github.com/envoyproxy/envoy/issues/18152 for a real-world +example of 503s during minRTT calculation windows.
  • +

See Envoy’s adaptive concurrency filter for more details.

@@ -1534,10 +1553,11 @@

AdaptiveConcurrency

maxConcurrencyLimit: 1000 concurrencyUpdateInterval: 100ms minRttCalcParams: - interval: 60s - requestCount: 50 - jitter: 10 - minConcurrency: 3 + dynamicSampling: + interval: 60s + requestCount: 50 + jitter: 10 + minConcurrency: 3 buffer: 25 concurrencyLimitExceededStatus: 503 @@ -1672,7 +1692,7 @@

MinimumRTTCalculationParams

-

Parameters controlling the periodic minRTT recalculation. +

Parameters controlling how the minRTT (baseline latency) is determined. The minRTT is periodically measured by allowing only a very low outstanding request count to an upstream cluster and measuring the latency under these ideal conditions.

@@ -1685,22 +1705,19 @@

-

-

The time interval between recalculating the minimum request round-trip -time. Must be >= 1ms.

-

When set, the controller periodically enters a low-concurrency measurement -window (pinned to min_concurrency) to re-measure the baseline latency. -During this window, throughput is temporarily reduced, so longer intervals -reduce overhead but may react slower to changes in upstream performance.

+

Periodically sample the minRTT by entering a low-concurrency +measurement window. Use this when the upstream’s baseline latency +may change over time.

@@ -1716,35 +1733,79 @@

+

+

Amount added to the measured minRTT to add stability to the concurrency +limit during natural variability in latency. This is expressed as a +percentage of the measured value and can be adjusted to allow more or +less tolerance to the sampled latency values. Defaults to 25%. +Value must be in the range [0, 100]. +This applies regardless of whether minRTT is dynamically sampled or fixed.

+ +
+
+
DynamicSampling
+
+

Parameters for dynamically sampling the minRTT by periodically entering +a low-concurrency measurement window.

+ + + + + + + + + + + + - - + - - + - - + - diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 285433060f..d6d7ab901f 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -311,7 +311,12 @@ message TrafficPolicy { // Adaptive concurrency settings for dynamically adjusting the allowed number of // outstanding requests based on sampled latencies. // - // Note: This operates independently from circuit breaker thresholds (e.g. + // Note: This applies only to HTTP/1.1 and HTTP/2 unary request-response + // traffic and is enforced on the server-side (inbound) proxy. It does not + // apply to TCP connections, gRPC streaming, or WebSocket connections, since + // the filter relies on measuring individual request round-trip latencies. + // + // This operates independently from circuit breaker thresholds (e.g. // max_connections). Both mechanisms can reject requests, but they act at // different layers: adaptive concurrency limits outstanding requests at // the HTTP filter level before routing, while circuit breakers limit @@ -853,6 +858,20 @@ message OutlierDetection { // load spikes or degraded performance, without requiring operators to manually // set fixed concurrency thresholds. // +// **Important:** When using dynamic sampling (`dynamic_sampling`), the controller +// periodically enters a minRTT measurement window where the concurrency limit +// drops to `min_concurrency` (default 3). During this window, requests exceeding +// that limit are rejected with 503. This can cause a noticeable spike in errors, +// especially under high traffic. To mitigate this: +// - Enable client-side retries for 503s, ideally with the `previous_hosts` +// retry predicate so rejected requests are retried on a different host +// that is not in a measurement window. +// - Use `jitter` to stagger measurement windows across hosts. +// - Consider using `fixed_latency` instead of `dynamic_sampling` if the +// upstream's baseline latency is well-known and stable. +// See https://github.com/envoyproxy/envoy/issues/18152 for a real-world +// example of 503s during minRTT calculation windows. +// // See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. @@ -876,10 +895,11 @@ message OutlierDetection { // maxConcurrencyLimit: 1000 // concurrencyUpdateInterval: 100ms // minRttCalcParams: -// interval: 60s -// requestCount: 50 -// jitter: 10 -// minConcurrency: 3 +// dynamicSampling: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 // buffer: 25 // concurrencyLimitExceededStatus: 503 // ``` @@ -916,14 +936,14 @@ message AdaptiveConcurrency { google.protobuf.Duration concurrency_update_interval = 3 [(google.api.field_behavior) = REQUIRED]; } - // Parameters controlling the periodic minRTT recalculation. + // Parameters controlling how the minRTT (baseline latency) is determined. // The minRTT is periodically measured by allowing only a very low outstanding // request count to an upstream cluster and measuring the latency under // these ideal conditions. message MinimumRTTCalculationParams { - // Exactly one of `interval` or `fixed_value` must be set to determine - // how the minRTT is obtained. - oneof min_rtt_source { + // Parameters for dynamically sampling the minRTT by periodically entering + // a low-concurrency measurement window. + message DynamicSampling { // The time interval between recalculating the minimum request round-trip // time. Must be >= 1ms. // @@ -933,6 +953,44 @@ message AdaptiveConcurrency { // reduce overhead but may react slower to changes in upstream performance. google.protobuf.Duration interval = 1; + // The number of requests to aggregate/sample during the minRTT + // recalculation window before updating. Defaults to 50. + google.protobuf.UInt32Value request_count = 2; + + // Randomized time delta that will be introduced to the start of the minRTT + // calculation window. This is represented as a percentage of the interval + // duration. Defaults to 15%. Value must be in the range [0, 100]. + // This is recommended to prevent all hosts in a cluster from + // being in a minRTT calculation window at the same time. + google.protobuf.UInt32Value jitter = 3; + + // The concurrency limit pinned during the minRTT measurement window. + // Defaults to 3. + // + // During the measurement window, the filter drops the concurrency limit to + // this value to measure latency under near-idle conditions. Requests that + // exceed this limit during the window are rejected with the configured + // status code (default 503). The window lasts until `request_count` samples + // are collected. + // + // To mitigate 503s during measurement windows: + // - Use `jitter` to stagger measurement windows across hosts so they + // don't all enter the window simultaneously. + // - Configure retries (with the `previous_hosts` retry predicate) so + // rejected requests are retried on a different host not currently in + // a measurement window. + // - Alternatively, use `fixed_latency` instead to skip dynamic + // measurement entirely if the baseline latency is known. + google.protobuf.UInt32Value min_concurrency = 4; + } + + // Exactly one of `dynamic_sampling` or `fixed_latency` must be set. + oneof min_rtt_source { + // Periodically sample the minRTT by entering a low-concurrency + // measurement window. Use this when the upstream's baseline latency + // may change over time. + DynamicSampling dynamic_sampling = 1; + // A fixed baseline round-trip time (minRTT) for the upstream, specified // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the // gradient controller "assume the upstream responds in this time under @@ -947,45 +1005,17 @@ message AdaptiveConcurrency { // // Use this when the baseline latency of the upstream is well-known and // stable, to avoid the periodic low-concurrency measurement windows - // that dynamic sampling (`interval`) requires. - google.protobuf.Duration fixed_value = 6; + // that dynamic sampling requires. + google.protobuf.Duration fixed_latency = 2; } - // The number of requests to aggregate/sample during the minRTT recalculation - // window before updating. Defaults to 50. - google.protobuf.UInt32Value request_count = 2; - - // Randomized time delta that will be introduced to the start of the minRTT - // calculation window. This is represented as a percentage of the interval duration. - // Defaults to 15%. Value must be in the range [0, 100]. - // This is recommended to prevent all hosts in a cluster from - // being in a minRTT calculation window at the same time. - google.protobuf.UInt32Value jitter = 3; - - // The concurrency limit pinned during the minRTT measurement window. - // Defaults to 3. - // - // During the measurement window, the filter drops the concurrency limit to - // this value to measure latency under near-idle conditions. Requests that - // exceed this limit during the window are rejected with the configured - // status code (default 503). The window lasts until `request_count` samples - // are collected. - // - // To mitigate 503s during measurement windows: - // - Use `jitter` to stagger measurement windows across hosts so they - // don't all enter the window simultaneously. - // - Configure retries (with the `previous_hosts` retry predicate) so - // rejected requests are retried on a different host not currently in - // a measurement window. - // - Alternatively, use `fixed_value` instead of `interval` to skip - // dynamic measurement entirely if the baseline latency is known. - google.protobuf.UInt32Value min_concurrency = 4; - - // Amount added to the measured minRTT to add stability to the concurrency limit - // during natural variability in latency. This is expressed as a percentage of the - // measured value and can be adjusted to allow more or less tolerance to the sampled - // latency values. Defaults to 25%. Value must be in the range [0, 100]. - google.protobuf.UInt32Value buffer = 5; + // Amount added to the measured minRTT to add stability to the concurrency + // limit during natural variability in latency. This is expressed as a + // percentage of the measured value and can be adjusted to allow more or + // less tolerance to the sampled latency values. Defaults to 25%. + // Value must be in the range [0, 100]. + // This applies regardless of whether minRTT is dynamically sampled or fixed. + google.protobuf.UInt32Value buffer = 3; } // The percentile to use when summarizing aggregated samples. Defaults to p50. diff --git a/networking/v1alpha3/destination_rule_deepcopy.gen.go b/networking/v1alpha3/destination_rule_deepcopy.gen.go index 117dbecd49..1fb9dd5141 100644 --- a/networking/v1alpha3/destination_rule_deepcopy.gen.go +++ b/networking/v1alpha3/destination_rule_deepcopy.gen.go @@ -488,6 +488,27 @@ func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationPara return in.DeepCopy() } +// DeepCopyInto supports using AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling within kubernetes types, where deepcopy-gen is used. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) DeepCopyInto(out *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) { + p := proto.Clone(in).(*AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) DeepCopy() *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling { + if in == nil { + return nil + } + out := new(AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling. Required by controller-gen. +func (in *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + // DeepCopyInto supports using ClientTLSSettings within kubernetes types, where deepcopy-gen is used. func (in *ClientTLSSettings) DeepCopyInto(out *ClientTLSSettings) { p := proto.Clone(in).(*ClientTLSSettings) diff --git a/networking/v1alpha3/destination_rule_json.gen.go b/networking/v1alpha3/destination_rule_json.gen.go index cca1e7b686..541a597b2b 100644 --- a/networking/v1alpha3/destination_rule_json.gen.go +++ b/networking/v1alpha3/destination_rule_json.gen.go @@ -259,6 +259,17 @@ func (this *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationPa return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling +func (this *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling +func (this *AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + // MarshalJSON is a custom marshaler for ClientTLSSettings func (this *ClientTLSSettings) MarshalJSON() ([]byte, error) { str, err := DestinationRuleMarshaler.MarshalToString(this) diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index 508a98be9e..11e8bda823 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -331,6 +331,21 @@ type OutlierDetection = v1alpha3.OutlierDetection // load spikes or degraded performance, without requiring operators to manually // set fixed concurrency thresholds. // +// **Important:** When using dynamic sampling (`dynamic_sampling`), the controller +// periodically enters a minRTT measurement window where the concurrency limit +// drops to `min_concurrency` (default 3). During this window, requests exceeding +// that limit are rejected with 503. This can cause a noticeable spike in errors, +// especially under high traffic. To mitigate this: +// - Enable client-side retries for 503s, ideally with the `previous_hosts` +// retry predicate so rejected requests are retried on a different host +// that is not in a measurement window. +// - Use `jitter` to stagger measurement windows across hosts. +// - Consider using `fixed_latency` instead of `dynamic_sampling` if the +// upstream's baseline latency is well-known and stable. +// +// See https://github.com/envoyproxy/envoy/issues/18152 for a real-world +// example of 503s during minRTT calculation windows. +// // See Envoy's // [adaptive concurrency filter](https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/adaptive_concurrency_filter) // for more details. @@ -357,10 +372,11 @@ type OutlierDetection = v1alpha3.OutlierDetection // maxConcurrencyLimit: 1000 // concurrencyUpdateInterval: 100ms // minRttCalcParams: -// interval: 60s -// requestCount: 50 -// jitter: 10 -// minConcurrency: 3 +// dynamicSampling: +// interval: 60s +// requestCount: 50 +// jitter: 10 +// minConcurrency: 3 // buffer: 25 // concurrencyLimitExceededStatus: 503 // @@ -376,20 +392,20 @@ type AdaptiveConcurrency_GradientControllerConfig = v1alpha3.AdaptiveConcurrency // from sampled request latencies. type AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_ConcurrencyLimitCalculationParams -// Parameters controlling the periodic minRTT recalculation. +// Parameters controlling how the minRTT (baseline latency) is determined. // The minRTT is periodically measured by allowing only a very low outstanding // request count to an upstream cluster and measuring the latency under // these ideal conditions. type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams -// The time interval between recalculating the minimum request round-trip -// time. Must be >= 1ms. -// -// When set, the controller periodically enters a low-concurrency measurement -// window (pinned to `min_concurrency`) to re-measure the baseline latency. -// During this window, throughput is temporarily reduced, so longer intervals -// reduce overhead but may react slower to changes in upstream performance. -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_Interval +// Parameters for dynamically sampling the minRTT by periodically entering +// a low-concurrency measurement window. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling + +// Periodically sample the minRTT by entering a low-concurrency +// measurement window. Use this when the upstream's baseline latency +// may change over time. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_DynamicSampling_ // A fixed baseline round-trip time (minRTT) for the upstream, specified // as a duration (e.g., `5ms`, `10ms`). Must be positive. This tells the @@ -407,8 +423,8 @@ type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_In // // Use this when the baseline latency of the upstream is well-known and // stable, to avoid the periodic low-concurrency measurement windows -// that dynamic sampling (`interval`) requires. -type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedValue +// that dynamic sampling requires. +type AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_MinimumRTTCalculationParams_FixedLatency // Gradient concurrency control will be used. type AdaptiveConcurrency_GradientControllerConfig_ = v1alpha3.AdaptiveConcurrency_GradientControllerConfig_
FieldDescription
+

The time interval between recalculating the minimum request round-trip +time. Must be >= 1ms.

+

When set, the controller periodically enters a low-concurrency measurement +window (pinned to min_concurrency) to re-measure the baseline latency. +During this window, throughput is temporarily reduced, so longer intervals +reduce overhead but may react slower to changes in upstream performance.

-

The number of requests to aggregate/sample during the minRTT recalculation -window before updating. Defaults to 50.

+

The number of requests to aggregate/sample during the minRTT +recalculation window before updating. Defaults to 50.

Randomized time delta that will be introduced to the start of the minRTT -calculation window. This is represented as a percentage of the interval duration. -Defaults to 15%. Value must be in the range [0, 100]. +calculation window. This is represented as a percentage of the interval +duration. Defaults to 15%. Value must be in the range [0, 100]. This is recommended to prevent all hosts in a cluster from being in a minRTT calculation window at the same time.

@@ -1762,22 +1823,10 @@

-

-

Amount added to the measured minRTT to add stability to the concurrency limit -during natural variability in latency. This is expressed as a percentage of the -measured value and can be adjusted to allow more or less tolerance to the sampled -latency values. Defaults to 25%. Value must be in the range [0, 100].

-