From 62de3c01509ba09d08d1a1eb0283d4164da12fcd Mon Sep 17 00:00:00 2001 From: wbpcode Date: Mon, 3 Aug 2026 11:16:51 +0800 Subject: [PATCH 1/5] lb: add new backend utililization lb policy Signed-off-by: wbpcode --- kubernetes/customresourcedefinitions.gen.yaml | 594 ++++++++++++++++++ networking/v1/destination_rule_alias.gen.go | 38 ++ networking/v1alpha3/destination_rule.pb.go | 359 ++++++++--- networking/v1alpha3/destination_rule.pb.html | 111 +++- networking/v1alpha3/destination_rule.proto | 66 ++ .../v1alpha3/destination_rule_deepcopy.gen.go | 21 + .../v1alpha3/destination_rule_json.gen.go | 11 + .../v1beta1/destination_rule_alias.gen.go | 38 ++ 8 files changed, 1138 insertions(+), 100 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 98401e81c0..ef3c24c4d2 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -936,11 +936,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -1384,11 +1435,63 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing + that uses backend-reported ORCA metrics to weight + endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to + endpoints that return errors, expressed + as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used + to compute utilization when the standard + `application_utilization` metric is not + available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting + utilization metrics for this long, its reported + weight is discarded and it reverts to the + default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported + utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -2013,11 +2116,55 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses backend-reported + ORCA metrics to weight endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints that + return errors, expressed as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is discarded + and it reverts to the default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes endpoint + weights from the latest reported utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -2453,11 +2600,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -3222,11 +3420,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -3670,11 +3919,63 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing + that uses backend-reported ORCA metrics to weight + endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to + endpoints that return errors, expressed + as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used + to compute utilization when the standard + `application_utilization` metric is not + available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting + utilization metrics for this long, its reported + weight is discarded and it reverts to the + default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported + utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -4299,11 +4600,55 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses backend-reported + ORCA metrics to weight endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints that + return errors, expressed as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is discarded + and it reverts to the default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes endpoint + weights from the latest reported utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -4739,11 +5084,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -5508,11 +5904,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -5956,11 +6403,63 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing + that uses backend-reported ORCA metrics to weight + endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to + endpoints that return errors, expressed + as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used + to compute utilization when the standard + `application_utilization` metric is not + available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting + utilization metrics for this long, its reported + weight is discarded and it reverts to the + default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported + utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater + than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -6585,11 +7084,55 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses backend-reported + ORCA metrics to weight endpoints by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints that + return errors, expressed as a percentage of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is discarded + and it reverts to the default (equal) weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes endpoint + weights from the latest reported utilization data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: @@ -7025,11 +7568,62 @@ spec: - simple - required: - consistentHash + - required: + - backendUtilization - required: - simple - required: - consistentHash + - required: + - backendUtilization properties: + backendUtilization: + description: Utilization-based load balancing that uses + backend-reported ORCA metrics to weight endpoints + by their current load. + properties: + blackoutPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + errorUtilizationPenaltyPercent: + description: Additional penalty applied to endpoints + that return errors, expressed as a percentage + of the utilization. + maximum: 4294967295 + minimum: 0 + type: integer + metricNamesForComputingUtilization: + description: Custom ORCA metric names used to compute + utilization when the standard `application_utilization` + metric is not available from the backend. + items: + type: string + type: array + weightExpirationPeriod: + description: If an endpoint stops reporting utilization + metrics for this long, its reported weight is + discarded and it reverts to the default (equal) + weight. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + weightUpdatePeriod: + description: How often the load balancer recomputes + endpoint weights from the latest reported utilization + data. + type: string + x-kubernetes-validations: + - message: must be a valid duration greater than + 1ms + rule: duration(self) >= duration('1ms') + type: object consistentHash: allOf: - oneOf: diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 5aefb6d2a5..76c859d741 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -136,6 +136,28 @@ type Subset = v1alpha3.Subset // ttl: 0s // // ``` +// +// The following example uses backend utilization to dynamically weight +// endpoints based on ORCA metrics reported by the backends: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: bookinfo-ratings +// +// spec: +// +// host: ratings.prod.svc.cluster.local +// trafficPolicy: +// loadBalancer: +// backendUtilization: +// blackoutPeriod: 10s +// weightExpirationPeriod: 3m +// weightUpdatePeriod: 1s +// +// ``` type LoadBalancerSettings = v1alpha3.LoadBalancerSettings // Consistent Hash-based load balancing can be used to provide soft @@ -184,6 +206,17 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev +// Client-side weighted round-robin load balancing policy that uses +// backend-reported utilization metrics (ORCA) to dynamically adjust +// endpoint weights. Endpoints that report higher utilization receive +// proportionally fewer requests. Endpoints that have not yet reported +// metrics are given equal weight. +// +// This corresponds to Envoy's +// [client_side_weighted_round_robin](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#weighted-round-robin) +// load balancing policy. +type LoadBalancerSettings_BackendUtilizationLB = v1alpha3.LoadBalancerSettings_BackendUtilizationLB + // +kubebuilder:validation:XValidation:message="only one of warmupDurationSecs or warmup can be set",rule="oneof(self.warmupDurationSecs, self.warmup)" // Standard load balancing algorithms that require no tuning. type LoadBalancerSettings_SimpleLB = v1alpha3.LoadBalancerSettings_SimpleLB @@ -224,6 +257,11 @@ type LoadBalancerSettings_Simple = v1alpha3.LoadBalancerSettings_Simple // Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. type LoadBalancerSettings_ConsistentHash = v1alpha3.LoadBalancerSettings_ConsistentHash + +// Utilization-based load balancing that uses backend-reported ORCA +// metrics to weight endpoints by their current load. Backends that +// report higher utilization receive fewer requests. +type LoadBalancerSettings_BackendUtilization = v1alpha3.LoadBalancerSettings_BackendUtilization type WarmupConfiguration = v1alpha3.WarmupConfiguration // Connection pool settings for an upstream host. The settings apply to diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 628a228857..cbb7c85396 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -801,6 +801,28 @@ func (x *Subset) GetTrafficPolicy() *TrafficPolicy { // ttl: 0s // // ``` +// +// The following example uses backend utilization to dynamically weight +// endpoints based on ORCA metrics reported by the backends: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: bookinfo-ratings +// +// spec: +// +// host: ratings.prod.svc.cluster.local +// trafficPolicy: +// loadBalancer: +// backendUtilization: +// blackoutPeriod: 10s +// weightExpirationPeriod: 3m +// weightUpdatePeriod: 1s +// +// ``` type LoadBalancerSettings struct { state protoimpl.MessageState `protogen:"open.v1"` // Upstream load balancing policy. @@ -809,6 +831,7 @@ type LoadBalancerSettings struct { // // *LoadBalancerSettings_Simple // *LoadBalancerSettings_ConsistentHash + // *LoadBalancerSettings_BackendUtilization LbPolicy isLoadBalancerSettings_LbPolicy `protobuf_oneof:"lb_policy"` // Locality load balancer settings. This will override mesh-wide settings in entirety, meaning no merging would be performed // between this object and the object one in MeshConfig @@ -888,6 +911,15 @@ func (x *LoadBalancerSettings) GetConsistentHash() *LoadBalancerSettings_Consist return nil } +func (x *LoadBalancerSettings) GetBackendUtilization() *LoadBalancerSettings_BackendUtilizationLB { + if x != nil { + if x, ok := x.LbPolicy.(*LoadBalancerSettings_BackendUtilization); ok { + return x.BackendUtilization + } + } + return nil +} + func (x *LoadBalancerSettings) GetLocalityLbSetting() *LocalityLoadBalancerSetting { if x != nil { return x.LocalityLbSetting @@ -930,10 +962,19 @@ type LoadBalancerSettings_ConsistentHash struct { ConsistentHash *LoadBalancerSettings_ConsistentHashLB `protobuf:"bytes,2,opt,name=consistent_hash,json=consistentHash,proto3,oneof"` } +type LoadBalancerSettings_BackendUtilization struct { + // Utilization-based load balancing that uses backend-reported ORCA + // metrics to weight endpoints by their current load. Backends that + // report higher utilization receive fewer requests. + BackendUtilization *LoadBalancerSettings_BackendUtilizationLB `protobuf:"bytes,7,opt,name=backend_utilization,json=backendUtilization,proto3,oneof"` +} + func (*LoadBalancerSettings_Simple) isLoadBalancerSettings_LbPolicy() {} func (*LoadBalancerSettings_ConsistentHash) isLoadBalancerSettings_LbPolicy() {} +func (*LoadBalancerSettings_BackendUtilization) isLoadBalancerSettings_LbPolicy() {} + type WarmupConfiguration struct { state protoimpl.MessageState `protogen:"open.v1"` // Duration of warmup mode @@ -2478,6 +2519,113 @@ func (*LoadBalancerSettings_ConsistentHashLB_RingHash_) isLoadBalancerSettings_C func (*LoadBalancerSettings_ConsistentHashLB_Maglev) isLoadBalancerSettings_ConsistentHashLB_HashAlgorithm() { } +// Client-side weighted round-robin load balancing policy that uses +// backend-reported utilization metrics (ORCA) to dynamically adjust +// endpoint weights. Endpoints that report higher utilization receive +// proportionally fewer requests. Endpoints that have not yet reported +// metrics are given equal weight. +// +// This corresponds to Envoy's +// [client_side_weighted_round_robin](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#weighted-round-robin) +// load balancing policy. +type LoadBalancerSettings_BackendUtilizationLB struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Duration after an endpoint first reports metrics before its weight + // is trusted. During the blackout period the endpoint receives the + // same weight as endpoints without metrics. + // Default is 10s. + BlackoutPeriod *duration.Duration `protobuf:"bytes,1,opt,name=blackout_period,json=blackoutPeriod,proto3" json:"blackout_period,omitempty"` + // If an endpoint stops reporting utilization metrics for this long, + // its reported weight is discarded and it reverts to the default + // (equal) weight. + // Default is 3m. + WeightExpirationPeriod *duration.Duration `protobuf:"bytes,2,opt,name=weight_expiration_period,json=weightExpirationPeriod,proto3" json:"weight_expiration_period,omitempty"` + // How often the load balancer recomputes endpoint weights from the + // latest reported utilization data. Smaller values react faster but + // increase CPU overhead. Minimum 100ms. + // Default is 1s. + WeightUpdatePeriod *duration.Duration `protobuf:"bytes,3,opt,name=weight_update_period,json=weightUpdatePeriod,proto3" json:"weight_update_period,omitempty"` + // Additional penalty applied to endpoints that return errors, + // expressed as a percentage of the utilization. For example, a value + // of 100 means the error rate is weighted 1.0x, and 150 means 1.5x. + // A value of 0 disables the penalty. + // Default is 0 (disabled). + // +kubebuilder:validation:Minimum=0 + ErrorUtilizationPenaltyPercent uint32 `protobuf:"varint,4,opt,name=error_utilization_penalty_percent,json=errorUtilizationPenaltyPercent,proto3" json:"error_utilization_penalty_percent,omitempty"` + // Custom ORCA metric names used to compute utilization when the + // standard `application_utilization` metric is not available from the + // backend. When set, these metrics are used in the weight formula + // instead of the default. + MetricNamesForComputingUtilization []string `protobuf:"bytes,5,rep,name=metric_names_for_computing_utilization,json=metricNamesForComputingUtilization,proto3" json:"metric_names_for_computing_utilization,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) Reset() { + *x = LoadBalancerSettings_BackendUtilizationLB{} + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoadBalancerSettings_BackendUtilizationLB) ProtoMessage() {} + +func (x *LoadBalancerSettings_BackendUtilizationLB) ProtoReflect() protoreflect.Message { + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[16] + 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 LoadBalancerSettings_BackendUtilizationLB.ProtoReflect.Descriptor instead. +func (*LoadBalancerSettings_BackendUtilizationLB) Descriptor() ([]byte, []int) { + return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 1} +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) GetBlackoutPeriod() *duration.Duration { + if x != nil { + return x.BlackoutPeriod + } + return nil +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) GetWeightExpirationPeriod() *duration.Duration { + if x != nil { + return x.WeightExpirationPeriod + } + return nil +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) GetWeightUpdatePeriod() *duration.Duration { + if x != nil { + return x.WeightUpdatePeriod + } + return nil +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) GetErrorUtilizationPenaltyPercent() uint32 { + if x != nil { + return x.ErrorUtilizationPenaltyPercent + } + return 0 +} + +func (x *LoadBalancerSettings_BackendUtilizationLB) GetMetricNamesForComputingUtilization() []string { + if x != nil { + return x.MetricNamesForComputingUtilization + } + return nil +} + type LoadBalancerSettings_ConsistentHashLB_RingHash struct { state protoimpl.MessageState `protogen:"open.v1"` // The minimum number of virtual nodes to use for the hash @@ -2492,7 +2640,7 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash struct { func (x *LoadBalancerSettings_ConsistentHashLB_RingHash) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_RingHash{} - 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) } @@ -2504,7 +2652,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[16] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2541,7 +2689,7 @@ type LoadBalancerSettings_ConsistentHashLB_MagLev struct { func (x *LoadBalancerSettings_ConsistentHashLB_MagLev) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_MagLev{} - 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) } @@ -2553,7 +2701,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[17] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2597,7 +2745,7 @@ type LoadBalancerSettings_ConsistentHashLB_HTTPCookie struct { func (x *LoadBalancerSettings_ConsistentHashLB_HTTPCookie) Reset() { *x = LoadBalancerSettings_ConsistentHashLB_HTTPCookie{} - 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) } @@ -2609,7 +2757,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[18] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2666,7 +2814,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[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2678,7 +2826,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[19] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2748,7 +2896,7 @@ type ConnectionPoolSettings_TCPSettings struct { func (x *ConnectionPoolSettings_TCPSettings) Reset() { *x = ConnectionPoolSettings_TCPSettings{} - 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) } @@ -2760,7 +2908,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[20] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2855,7 +3003,7 @@ type ConnectionPoolSettings_HTTPSettings struct { func (x *ConnectionPoolSettings_HTTPSettings) Reset() { *x = ConnectionPoolSettings_HTTPSettings{} - 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) } @@ -2867,7 +3015,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[21] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2967,7 +3115,7 @@ type ConnectionPoolSettings_TCPSettings_TcpKeepalive struct { func (x *ConnectionPoolSettings_TCPSettings_TcpKeepalive) Reset() { *x = ConnectionPoolSettings_TCPSettings_TcpKeepalive{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[22] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2979,7 +3127,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[22] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3031,7 +3179,7 @@ type ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive struct { func (x *ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive) Reset() { *x = ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3043,7 +3191,7 @@ func (x *ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive) String() strin func (*ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive) ProtoMessage() {} func (x *ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive) ProtoReflect() protoreflect.Message { - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[23] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3097,7 +3245,7 @@ type LocalityLoadBalancerSetting_Distribute struct { func (x *LocalityLoadBalancerSetting_Distribute) Reset() { *x = LocalityLoadBalancerSetting_Distribute{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[24] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3109,7 +3257,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[24] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3159,7 +3307,7 @@ type LocalityLoadBalancerSetting_Failover struct { func (x *LocalityLoadBalancerSetting_Failover) Reset() { *x = LocalityLoadBalancerSetting_Failover{} - mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[25] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3171,7 +3319,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[25] + mi := &file_networking_v1alpha3_destination_rule_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3221,7 +3369,7 @@ type ZoneAwareLoadBalancerSetting_Failover struct { func (x *ZoneAwareLoadBalancerSetting_Failover) Reset() { *x = ZoneAwareLoadBalancerSetting_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) } @@ -3233,7 +3381,7 @@ func (x *ZoneAwareLoadBalancerSetting_Failover) String() string { func (*ZoneAwareLoadBalancerSetting_Failover) ProtoMessage() {} func (x *ZoneAwareLoadBalancerSetting_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 { @@ -3310,10 +3458,11 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x0etraffic_policy\x18\x03 \x01(\v2(.istio.networking.v1alpha3.TrafficPolicyR\rtrafficPolicy\x1a9\n" + "\vLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xed\f\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x84\x11\n" + "\x14LoadBalancerSettings\x12R\n" + "\x06simple\x18\x01 \x01(\x0e28.istio.networking.v1alpha3.LoadBalancerSettings.SimpleLBH\x00R\x06simple\x12k\n" + - "\x0fconsistent_hash\x18\x02 \x01(\v2@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00R\x0econsistentHash\x12f\n" + + "\x0fconsistent_hash\x18\x02 \x01(\v2@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00R\x0econsistentHash\x12w\n" + + "\x13backend_utilization\x18\a \x01(\v2D.istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLBH\x00R\x12backendUtilization\x12f\n" + "\x13locality_lb_setting\x18\x03 \x01(\v26.istio.networking.v1alpha3.LocalityLoadBalancerSettingR\x11localityLbSetting\x12j\n" + "\x15zone_aware_lb_setting\x18\x06 \x01(\v27.istio.networking.v1alpha3.ZoneAwareLoadBalancerSettingR\x12zoneAwareLbSetting\x12K\n" + "\x14warmup_duration_secs\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x12warmupDurationSecs\x12F\n" + @@ -3345,7 +3494,13 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\tR\x05valueB\n" + "\n" + "\bhash_keyB\x10\n" + - "\x0ehash_algorithm\"p\n" + + "\x0ehash_algorithm\x1a\x9b\x03\n" + + "\x14BackendUtilizationLB\x12B\n" + + "\x0fblackout_period\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x0eblackoutPeriod\x12S\n" + + "\x18weight_expiration_period\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x16weightExpirationPeriod\x12K\n" + + "\x14weight_update_period\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x12weightUpdatePeriod\x12I\n" + + "!error_utilization_penalty_percent\x18\x04 \x01(\rR\x1eerrorUtilizationPenaltyPercent\x12R\n" + + "&metric_names_for_computing_utilization\x18\x05 \x03(\tR\"metricNamesForComputingUtilization\"p\n" + "\bSimpleLB\x12\x0f\n" + "\vUNSPECIFIED\x10\x00\x12\x12\n" + "\n" + @@ -3462,7 +3617,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, 28) +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 @@ -3484,30 +3639,31 @@ var file_networking_v1alpha3_destination_rule_proto_goTypes = []any{ (*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 - (*ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive)(nil), // 27: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive - (*LocalityLoadBalancerSetting_Distribute)(nil), // 28: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - (*LocalityLoadBalancerSetting_Failover)(nil), // 29: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - nil, // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - (*ZoneAwareLoadBalancerSetting_Failover)(nil), // 31: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.Failover - (*v1beta1.WorkloadSelector)(nil), // 32: istio.type.v1beta1.WorkloadSelector - (*duration.Duration)(nil), // 33: google.protobuf.Duration - (*wrappers.DoubleValue)(nil), // 34: google.protobuf.DoubleValue - (*wrappers.UInt32Value)(nil), // 35: google.protobuf.UInt32Value - (*wrappers.BoolValue)(nil), // 36: google.protobuf.BoolValue - (*wrappers.UInt64Value)(nil), // 37: google.protobuf.UInt64Value - (*PortSelector)(nil), // 38: istio.networking.v1alpha3.PortSelector + (*LoadBalancerSettings_BackendUtilizationLB)(nil), // 20: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB + (*LoadBalancerSettings_ConsistentHashLB_RingHash)(nil), // 21: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + (*LoadBalancerSettings_ConsistentHashLB_MagLev)(nil), // 22: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie)(nil), // 23: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + (*LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute)(nil), // 24: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute + (*ConnectionPoolSettings_TCPSettings)(nil), // 25: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + (*ConnectionPoolSettings_HTTPSettings)(nil), // 26: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + (*ConnectionPoolSettings_TCPSettings_TcpKeepalive)(nil), // 27: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + (*ConnectionPoolSettings_HTTPSettings_ConnectionKeepalive)(nil), // 28: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive + (*LocalityLoadBalancerSetting_Distribute)(nil), // 29: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + (*LocalityLoadBalancerSetting_Failover)(nil), // 30: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover + nil, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + (*ZoneAwareLoadBalancerSetting_Failover)(nil), // 32: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.Failover + (*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 + (*wrappers.UInt64Value)(nil), // 38: google.protobuf.UInt64Value + (*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 - 32, // 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 @@ -3520,58 +3676,62 @@ var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 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 19, // 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 - 13, // 16: istio.networking.v1alpha3.LoadBalancerSettings.zone_aware_lb_setting:type_name -> istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting - 33, // 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 - 33, // 19: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration - 34, // 20: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue - 34, // 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 - 35, // 24: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value - 35, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value - 35, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value - 33, // 27: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration - 33, // 28: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration - 3, // 29: istio.networking.v1alpha3.ClientTLSSettings.mode:type_name -> istio.networking.v1alpha3.ClientTLSSettings.TLSmode - 36, // 30: istio.networking.v1alpha3.ClientTLSSettings.insecure_skip_verify:type_name -> google.protobuf.BoolValue - 28, // 31: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute - 29, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Failover - 36, // 33: istio.networking.v1alpha3.LocalityLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue - 36, // 34: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue - 31, // 35: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.Failover - 37, // 36: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.min_cluster_size:type_name -> google.protobuf.UInt64Value - 38, // 37: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector - 7, // 38: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings - 9, // 39: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings - 10, // 40: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection - 11, // 41: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings - 0, // 42: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION - 34, // 43: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue - 33, // 44: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.budget_interval:type_name -> google.protobuf.Duration - 22, // 45: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie - 20, // 46: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash - 21, // 47: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - 33, // 48: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration - 23, // 49: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute - 33, // 50: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration - 26, // 51: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive - 33, // 52: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration - 33, // 53: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration - 33, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration - 2, // 55: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy - 27, // 56: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.http2_keep_alive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive - 33, // 57: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration - 33, // 58: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration - 33, // 59: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive.interval:type_name -> google.protobuf.Duration - 33, // 60: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive.timeout:type_name -> google.protobuf.Duration - 30, // 61: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry - 62, // [62:62] is the sub-list for method output_type - 62, // [62:62] is the sub-list for method input_type - 62, // [62:62] is the sub-list for extension type_name - 62, // [62:62] is the sub-list for extension extendee - 0, // [0:62] is the sub-list for field type_name + 20, // 15: istio.networking.v1alpha3.LoadBalancerSettings.backend_utilization:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB + 12, // 16: istio.networking.v1alpha3.LoadBalancerSettings.locality_lb_setting:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting + 13, // 17: istio.networking.v1alpha3.LoadBalancerSettings.zone_aware_lb_setting:type_name -> istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting + 34, // 18: istio.networking.v1alpha3.LoadBalancerSettings.warmup_duration_secs:type_name -> google.protobuf.Duration + 8, // 19: istio.networking.v1alpha3.LoadBalancerSettings.warmup:type_name -> istio.networking.v1alpha3.WarmupConfiguration + 34, // 20: istio.networking.v1alpha3.WarmupConfiguration.duration:type_name -> google.protobuf.Duration + 35, // 21: istio.networking.v1alpha3.WarmupConfiguration.minimum_percent:type_name -> google.protobuf.DoubleValue + 35, // 22: istio.networking.v1alpha3.WarmupConfiguration.aggression:type_name -> google.protobuf.DoubleValue + 25, // 23: istio.networking.v1alpha3.ConnectionPoolSettings.tcp:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings + 26, // 24: istio.networking.v1alpha3.ConnectionPoolSettings.http:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings + 36, // 25: istio.networking.v1alpha3.OutlierDetection.consecutive_local_origin_failures:type_name -> google.protobuf.UInt32Value + 36, // 26: istio.networking.v1alpha3.OutlierDetection.consecutive_gateway_errors:type_name -> google.protobuf.UInt32Value + 36, // 27: istio.networking.v1alpha3.OutlierDetection.consecutive_5xx_errors:type_name -> google.protobuf.UInt32Value + 34, // 28: istio.networking.v1alpha3.OutlierDetection.interval:type_name -> google.protobuf.Duration + 34, // 29: istio.networking.v1alpha3.OutlierDetection.base_ejection_time:type_name -> google.protobuf.Duration + 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 + 29, // 32: istio.networking.v1alpha3.LocalityLoadBalancerSetting.distribute:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute + 30, // 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 + 37, // 35: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.enabled:type_name -> google.protobuf.BoolValue + 32, // 36: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.failover:type_name -> istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.Failover + 38, // 37: istio.networking.v1alpha3.ZoneAwareLoadBalancerSetting.min_cluster_size:type_name -> google.protobuf.UInt64Value + 39, // 38: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.port:type_name -> istio.networking.v1alpha3.PortSelector + 7, // 39: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.load_balancer:type_name -> istio.networking.v1alpha3.LoadBalancerSettings + 9, // 40: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.connection_pool:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings + 10, // 41: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.outlier_detection:type_name -> istio.networking.v1alpha3.OutlierDetection + 11, // 42: istio.networking.v1alpha3.TrafficPolicy.PortTrafficPolicy.tls:type_name -> istio.networking.v1alpha3.ClientTLSSettings + 0, // 43: istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.version:type_name -> istio.networking.v1alpha3.TrafficPolicy.ProxyProtocol.VERSION + 35, // 44: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.percent:type_name -> google.protobuf.DoubleValue + 34, // 45: istio.networking.v1alpha3.TrafficPolicy.RetryBudget.budget_interval:type_name -> google.protobuf.Duration + 23, // 46: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie + 21, // 47: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash + 22, // 48: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev + 34, // 49: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.blackout_period:type_name -> google.protobuf.Duration + 34, // 50: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.weight_expiration_period:type_name -> google.protobuf.Duration + 34, // 51: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.weight_update_period:type_name -> google.protobuf.Duration + 34, // 52: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration + 24, // 53: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.attributes:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.Attribute + 34, // 54: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.connect_timeout:type_name -> google.protobuf.Duration + 27, // 55: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.tcp_keepalive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive + 34, // 56: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.max_connection_duration:type_name -> google.protobuf.Duration + 34, // 57: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.idle_timeout:type_name -> google.protobuf.Duration + 34, // 58: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.idle_timeout:type_name -> google.protobuf.Duration + 2, // 59: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.h2_upgrade_policy:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.H2UpgradePolicy + 28, // 60: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.http2_keep_alive:type_name -> istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive + 34, // 61: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.time:type_name -> google.protobuf.Duration + 34, // 62: istio.networking.v1alpha3.ConnectionPoolSettings.TCPSettings.TcpKeepalive.interval:type_name -> google.protobuf.Duration + 34, // 63: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive.interval:type_name -> google.protobuf.Duration + 34, // 64: istio.networking.v1alpha3.ConnectionPoolSettings.HTTPSettings.ConnectionKeepalive.timeout:type_name -> google.protobuf.Duration + 31, // 65: istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.to:type_name -> istio.networking.v1alpha3.LocalityLoadBalancerSetting.Distribute.ToEntry + 66, // [66:66] is the sub-list for method output_type + 66, // [66:66] is the sub-list for method input_type + 66, // [66:66] is the sub-list for extension type_name + 66, // [66:66] is the sub-list for extension extendee + 0, // [0:66] is the sub-list for field type_name } func init() { file_networking_v1alpha3_destination_rule_proto_init() } @@ -3583,6 +3743,7 @@ func file_networking_v1alpha3_destination_rule_proto_init() { file_networking_v1alpha3_destination_rule_proto_msgTypes[3].OneofWrappers = []any{ (*LoadBalancerSettings_Simple)(nil), (*LoadBalancerSettings_ConsistentHash)(nil), + (*LoadBalancerSettings_BackendUtilization)(nil), } file_networking_v1alpha3_destination_rule_proto_msgTypes[15].OneofWrappers = []any{ (*LoadBalancerSettings_ConsistentHashLB_HttpHeaderName)(nil), @@ -3598,7 +3759,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: 28, + NumMessages: 29, NumExtensions: 0, NumServices: 0, }, diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index cb13ffa7ec..06c3a6c17c 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 @@ -610,6 +610,21 @@

LoadBalancerSettings

name: user ttl: 0s +

The following example uses backend utilization to dynamically weight +endpoints based on ORCA metrics reported by the backends:

+
apiVersion: networking.istio.io/v1
+kind: DestinationRule
+metadata:
+  name: bookinfo-ratings
+spec:
+  host: ratings.prod.svc.cluster.local
+  trafficPolicy:
+    loadBalancer:
+      backendUtilization:
+        blackoutPeriod: 10s
+        weightExpirationPeriod: 3m
+        weightUpdatePeriod: 1s
+
@@ -635,6 +650,17 @@

LoadBalancerSettings

+ + + + @@ -915,6 +941,89 @@
Attribute

The optional value of the cookie attribute.

+ +
+ +

Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties.

+
+

Utilization-based load balancing that uses backend-reported ORCA +metrics to weight endpoints by their current load. Backends that +report higher utilization receive fewer requests.

+
+ +

BackendUtilizationLB

+
+

Client-side weighted round-robin load balancing policy that uses +backend-reported utilization metrics (ORCA) to dynamically adjust +endpoint weights. Endpoints that report higher utilization receive +proportionally fewer requests. Endpoints that have not yet reported +metrics are given equal weight.

+

This corresponds to Envoy’s +client_side_weighted_round_robin +load balancing policy.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 9d7268524f..dd71a2dee3 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -415,6 +415,24 @@ message Subset { // ttl: 0s // ``` // +// The following example uses backend utilization to dynamically weight +// endpoints based on ORCA metrics reported by the backends: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// name: bookinfo-ratings +// spec: +// host: ratings.prod.svc.cluster.local +// trafficPolicy: +// loadBalancer: +// backendUtilization: +// blackoutPeriod: 10s +// weightExpirationPeriod: 3m +// weightUpdatePeriod: 1s +// ``` +// message LoadBalancerSettings { // +kubebuilder:validation:XValidation:message="only one of warmupDurationSecs or warmup can be set",rule="oneof(self.warmupDurationSecs, self.warmup)" // Standard load balancing algorithms that require no tuning. @@ -542,6 +560,49 @@ message LoadBalancerSettings { uint64 minimum_ring_size = 4 [deprecated = true]; } + // Client-side weighted round-robin load balancing policy that uses + // backend-reported utilization metrics (ORCA) to dynamically adjust + // endpoint weights. Endpoints that report higher utilization receive + // proportionally fewer requests. Endpoints that have not yet reported + // metrics are given equal weight. + // + // This corresponds to Envoy's + // [client_side_weighted_round_robin](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#weighted-round-robin) + // load balancing policy. + message BackendUtilizationLB { + // Duration after an endpoint first reports metrics before its weight + // is trusted. During the blackout period the endpoint receives the + // same weight as endpoints without metrics. + // Default is 10s. + google.protobuf.Duration blackout_period = 1; + + // If an endpoint stops reporting utilization metrics for this long, + // its reported weight is discarded and it reverts to the default + // (equal) weight. + // Default is 3m. + google.protobuf.Duration weight_expiration_period = 2; + + // How often the load balancer recomputes endpoint weights from the + // latest reported utilization data. Smaller values react faster but + // increase CPU overhead. Minimum 100ms. + // Default is 1s. + google.protobuf.Duration weight_update_period = 3; + + // Additional penalty applied to endpoints that return errors, + // expressed as a percentage of the utilization. For example, a value + // of 100 means the error rate is weighted 1.0x, and 150 means 1.5x. + // A value of 0 disables the penalty. + // Default is 0 (disabled). + // +kubebuilder:validation:Minimum=0 + uint32 error_utilization_penalty_percent = 4; + + // Custom ORCA metric names used to compute utilization when the + // standard `application_utilization` metric is not available from the + // backend. When set, these metrics are used in the weight formula + // instead of the default. + repeated string metric_names_for_computing_utilization = 5; + } + // Upstream load balancing policy. oneof lb_policy { // Standard load balancing algorithms that require no tuning. @@ -549,6 +610,11 @@ message LoadBalancerSettings { // Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. ConsistentHashLB consistent_hash = 2; + + // Utilization-based load balancing that uses backend-reported ORCA + // metrics to weight endpoints by their current load. Backends that + // report higher utilization receive fewer requests. + BackendUtilizationLB backend_utilization = 7; } // Locality load balancer settings. This will override mesh-wide settings in entirety, meaning no merging would be performed diff --git a/networking/v1alpha3/destination_rule_deepcopy.gen.go b/networking/v1alpha3/destination_rule_deepcopy.gen.go index 57462203e7..ff29fabb7e 100644 --- a/networking/v1alpha3/destination_rule_deepcopy.gen.go +++ b/networking/v1alpha3/destination_rule_deepcopy.gen.go @@ -278,6 +278,27 @@ func (in *LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) DeepCopyIn return in.DeepCopy() } +// DeepCopyInto supports using LoadBalancerSettings_BackendUtilizationLB within kubernetes types, where deepcopy-gen is used. +func (in *LoadBalancerSettings_BackendUtilizationLB) DeepCopyInto(out *LoadBalancerSettings_BackendUtilizationLB) { + p := proto.Clone(in).(*LoadBalancerSettings_BackendUtilizationLB) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_BackendUtilizationLB. Required by controller-gen. +func (in *LoadBalancerSettings_BackendUtilizationLB) DeepCopy() *LoadBalancerSettings_BackendUtilizationLB { + if in == nil { + return nil + } + out := new(LoadBalancerSettings_BackendUtilizationLB) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerSettings_BackendUtilizationLB. Required by controller-gen. +func (in *LoadBalancerSettings_BackendUtilizationLB) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + // DeepCopyInto supports using WarmupConfiguration within kubernetes types, where deepcopy-gen is used. func (in *WarmupConfiguration) DeepCopyInto(out *WarmupConfiguration) { p := proto.Clone(in).(*WarmupConfiguration) diff --git a/networking/v1alpha3/destination_rule_json.gen.go b/networking/v1alpha3/destination_rule_json.gen.go index 99fdd0e811..a16a992f47 100644 --- a/networking/v1alpha3/destination_rule_json.gen.go +++ b/networking/v1alpha3/destination_rule_json.gen.go @@ -149,6 +149,17 @@ func (this *LoadBalancerSettings_ConsistentHashLB_HTTPCookie_Attribute) Unmarsha return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for LoadBalancerSettings_BackendUtilizationLB +func (this *LoadBalancerSettings_BackendUtilizationLB) MarshalJSON() ([]byte, error) { + str, err := DestinationRuleMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for LoadBalancerSettings_BackendUtilizationLB +func (this *LoadBalancerSettings_BackendUtilizationLB) UnmarshalJSON(b []byte) error { + return DestinationRuleUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + // MarshalJSON is a custom marshaler for WarmupConfiguration func (this *WarmupConfiguration) 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 bdf20dc10d..84c6a2d329 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -136,6 +136,28 @@ type Subset = v1alpha3.Subset // ttl: 0s // // ``` +// +// The following example uses backend utilization to dynamically weight +// endpoints based on ORCA metrics reported by the backends: +// +// ```yaml +// apiVersion: networking.istio.io/v1 +// kind: DestinationRule +// metadata: +// +// name: bookinfo-ratings +// +// spec: +// +// host: ratings.prod.svc.cluster.local +// trafficPolicy: +// loadBalancer: +// backendUtilization: +// blackoutPeriod: 10s +// weightExpirationPeriod: 3m +// weightUpdatePeriod: 1s +// +// ``` type LoadBalancerSettings = v1alpha3.LoadBalancerSettings // Consistent Hash-based load balancing can be used to provide soft @@ -184,6 +206,17 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev +// Client-side weighted round-robin load balancing policy that uses +// backend-reported utilization metrics (ORCA) to dynamically adjust +// endpoint weights. Endpoints that report higher utilization receive +// proportionally fewer requests. Endpoints that have not yet reported +// metrics are given equal weight. +// +// This corresponds to Envoy's +// [client_side_weighted_round_robin](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/load_balancing/load_balancers#weighted-round-robin) +// load balancing policy. +type LoadBalancerSettings_BackendUtilizationLB = v1alpha3.LoadBalancerSettings_BackendUtilizationLB + // +kubebuilder:validation:XValidation:message="only one of warmupDurationSecs or warmup can be set",rule="oneof(self.warmupDurationSecs, self.warmup)" // Standard load balancing algorithms that require no tuning. type LoadBalancerSettings_SimpleLB = v1alpha3.LoadBalancerSettings_SimpleLB @@ -224,6 +257,11 @@ type LoadBalancerSettings_Simple = v1alpha3.LoadBalancerSettings_Simple // Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. type LoadBalancerSettings_ConsistentHash = v1alpha3.LoadBalancerSettings_ConsistentHash + +// Utilization-based load balancing that uses backend-reported ORCA +// metrics to weight endpoints by their current load. Backends that +// report higher utilization receive fewer requests. +type LoadBalancerSettings_BackendUtilization = v1alpha3.LoadBalancerSettings_BackendUtilization type WarmupConfiguration = v1alpha3.WarmupConfiguration // Connection pool settings for an upstream host. The settings apply to From 1330c4c2f4e3b3d24850d17e5197def2a257a15e Mon Sep 17 00:00:00 2001 From: wbpcode Date: Mon, 3 Aug 2026 12:25:03 +0800 Subject: [PATCH 2/5] add release note Signed-off-by: wbpcode --- releasenotes/notes/backend-utilization-lb.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 releasenotes/notes/backend-utilization-lb.yaml diff --git a/releasenotes/notes/backend-utilization-lb.yaml b/releasenotes/notes/backend-utilization-lb.yaml new file mode 100644 index 0000000000..c93104eb4d --- /dev/null +++ b/releasenotes/notes/backend-utilization-lb.yaml @@ -0,0 +1,10 @@ +apiVersion: release-notes/v2 +kind: feature +area: traffic-management +issue: [] +releaseNotes: + - | + **Added** `backendUtilization` load balancing policy to `DestinationRule`, + enabling client-side weighted round-robin based on backend-reported ORCA + utilization metrics. Endpoints reporting higher utilization automatically + receive fewer requests. \ No newline at end of file From e3f6a15096e46b8cd0fbad45cfac317f7fd95f10 Mon Sep 17 00:00:00 2001 From: wbpcode Date: Mon, 3 Aug 2026 15:38:47 +0800 Subject: [PATCH 3/5] address tests Signed-off-by: wbpcode --- kubernetes/customresourcedefinitions.gen.yaml | 135 ------------------ networking/v1alpha3/destination_rule.pb.go | 3 + networking/v1alpha3/destination_rule.proto | 3 + 3 files changed, 6 insertions(+), 135 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index ef3c24c4d2..14821bfb44 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -954,10 +954,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -978,19 +974,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -1453,10 +1441,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -1478,19 +1462,11 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -2133,9 +2109,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -2154,16 +2127,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -2618,10 +2585,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -2642,19 +2605,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -3438,10 +3393,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -3462,19 +3413,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -3937,10 +3880,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -3962,19 +3901,11 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -4617,9 +4548,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -4638,16 +4566,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -5102,10 +5024,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -5126,19 +5044,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -5922,10 +5832,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -5946,19 +5852,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -6421,10 +6319,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -6446,19 +6340,11 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater - than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -7101,9 +6987,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -7122,16 +7005,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: @@ -7586,10 +7463,6 @@ spec: description: Duration after an endpoint first reports metrics before its weight is trusted. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -7610,19 +7483,11 @@ spec: discarded and it reverts to the default (equal) weight. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. type: string - x-kubernetes-validations: - - message: must be a valid duration greater than - 1ms - rule: duration(self) >= duration('1ms') type: object consistentHash: allOf: diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index cbb7c85396..6b3637920c 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -2534,16 +2534,19 @@ type LoadBalancerSettings_BackendUtilizationLB struct { // is trusted. During the blackout period the endpoint receives the // same weight as endpoints without metrics. // Default is 10s. + // +protoc-gen-crd:duration-validation:none BlackoutPeriod *duration.Duration `protobuf:"bytes,1,opt,name=blackout_period,json=blackoutPeriod,proto3" json:"blackout_period,omitempty"` // If an endpoint stops reporting utilization metrics for this long, // its reported weight is discarded and it reverts to the default // (equal) weight. // Default is 3m. + // +protoc-gen-crd:duration-validation:none WeightExpirationPeriod *duration.Duration `protobuf:"bytes,2,opt,name=weight_expiration_period,json=weightExpirationPeriod,proto3" json:"weight_expiration_period,omitempty"` // How often the load balancer recomputes endpoint weights from the // latest reported utilization data. Smaller values react faster but // increase CPU overhead. Minimum 100ms. // Default is 1s. + // +protoc-gen-crd:duration-validation:none WeightUpdatePeriod *duration.Duration `protobuf:"bytes,3,opt,name=weight_update_period,json=weightUpdatePeriod,proto3" json:"weight_update_period,omitempty"` // Additional penalty applied to endpoints that return errors, // expressed as a percentage of the utilization. For example, a value diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index dd71a2dee3..cb44d83648 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -574,18 +574,21 @@ message LoadBalancerSettings { // is trusted. During the blackout period the endpoint receives the // same weight as endpoints without metrics. // Default is 10s. + // +protoc-gen-crd:duration-validation:none google.protobuf.Duration blackout_period = 1; // If an endpoint stops reporting utilization metrics for this long, // its reported weight is discarded and it reverts to the default // (equal) weight. // Default is 3m. + // +protoc-gen-crd:duration-validation:none google.protobuf.Duration weight_expiration_period = 2; // How often the load balancer recomputes endpoint weights from the // latest reported utilization data. Smaller values react faster but // increase CPU overhead. Minimum 100ms. // Default is 1s. + // +protoc-gen-crd:duration-validation:none google.protobuf.Duration weight_update_period = 3; // Additional penalty applied to endpoints that return errors, From 96756ef27f627f2a536be30973b4815f65ed47d2 Mon Sep 17 00:00:00 2001 From: wbpcode Date: Mon, 10 Aug 2026 18:58:32 +0800 Subject: [PATCH 4/5] address comments Signed-off-by: wbpcode --- kubernetes/customresourcedefinitions.gen.yaml | 135 ++++++++---------- networking/v1/destination_rule_alias.gen.go | 2 +- networking/v1alpha3/destination_rule.pb.go | 32 +++-- networking/v1alpha3/destination_rule.pb.html | 19 ++- networking/v1alpha3/destination_rule.proto | 18 ++- .../v1beta1/destination_rule_alias.gen.go | 2 +- .../notes/backend-utilization-lb.yaml | 4 +- 7 files changed, 107 insertions(+), 105 deletions(-) diff --git a/kubernetes/customresourcedefinitions.gen.yaml b/kubernetes/customresourcedefinitions.gen.yaml index 14821bfb44..f6489a0e90 100644 --- a/kubernetes/customresourcedefinitions.gen.yaml +++ b/kubernetes/customresourcedefinitions.gen.yaml @@ -950,10 +950,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -963,8 +959,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -974,6 +969,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization @@ -1437,10 +1436,6 @@ spec: that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first - reports metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -1450,9 +1445,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used - to compute utilization when the standard - `application_utilization` metric is not - available from the backend. + to compute utilization. items: type: string type: array @@ -1462,6 +1455,10 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported @@ -2105,10 +2102,6 @@ spec: description: Utilization-based load balancing that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -2117,8 +2110,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -2127,6 +2119,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. @@ -2581,10 +2577,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -2594,8 +2586,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -2605,6 +2596,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization @@ -3389,10 +3384,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -3402,8 +3393,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -3413,6 +3403,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization @@ -3876,10 +3870,6 @@ spec: that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first - reports metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -3889,9 +3879,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used - to compute utilization when the standard - `application_utilization` metric is not - available from the backend. + to compute utilization. items: type: string type: array @@ -3901,6 +3889,10 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported @@ -4544,10 +4536,6 @@ spec: description: Utilization-based load balancing that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -4556,8 +4544,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -4566,6 +4553,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. @@ -5020,10 +5011,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -5033,8 +5020,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -5044,6 +5030,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization @@ -5828,10 +5818,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -5841,8 +5827,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -5852,6 +5837,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization @@ -6315,10 +6304,6 @@ spec: that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first - reports metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed @@ -6328,9 +6313,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used - to compute utilization when the standard - `application_utilization` metric is not - available from the backend. + to compute utilization. items: type: string type: array @@ -6340,6 +6323,10 @@ spec: weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first + reports metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported @@ -6983,10 +6970,6 @@ spec: description: Utilization-based load balancing that uses backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage of the utilization. @@ -6995,8 +6978,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -7005,6 +6987,10 @@ spec: metrics for this long, its reported weight is discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization data. @@ -7459,10 +7445,6 @@ spec: backend-reported ORCA metrics to weight endpoints by their current load. properties: - blackoutPeriod: - description: Duration after an endpoint first reports - metrics before its weight is trusted. - type: string errorUtilizationPenaltyPercent: description: Additional penalty applied to endpoints that return errors, expressed as a percentage @@ -7472,8 +7454,7 @@ spec: type: integer metricNamesForComputingUtilization: description: Custom ORCA metric names used to compute - utilization when the standard `application_utilization` - metric is not available from the backend. + utilization. items: type: string type: array @@ -7483,6 +7464,10 @@ spec: discarded and it reverts to the default (equal) weight. type: string + weightStabilizationPeriod: + description: Duration after an endpoint first reports + metrics before its weight is trusted. + type: string weightUpdatePeriod: description: How often the load balancer recomputes endpoint weights from the latest reported utilization diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 76c859d741..16d5d39a62 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -206,7 +206,7 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev -// Client-side weighted round-robin load balancing policy that uses +// BackendUtilizationLB load balancing policy that uses // backend-reported utilization metrics (ORCA) to dynamically adjust // endpoint weights. Endpoints that report higher utilization receive // proportionally fewer requests. Endpoints that have not yet reported diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 6b3637920c..30a2ed5ba6 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -2519,7 +2519,7 @@ func (*LoadBalancerSettings_ConsistentHashLB_RingHash_) isLoadBalancerSettings_C func (*LoadBalancerSettings_ConsistentHashLB_Maglev) isLoadBalancerSettings_ConsistentHashLB_HashAlgorithm() { } -// Client-side weighted round-robin load balancing policy that uses +// BackendUtilizationLB load balancing policy that uses // backend-reported utilization metrics (ORCA) to dynamically adjust // endpoint weights. Endpoints that report higher utilization receive // proportionally fewer requests. Endpoints that have not yet reported @@ -2535,7 +2535,7 @@ type LoadBalancerSettings_BackendUtilizationLB struct { // same weight as endpoints without metrics. // Default is 10s. // +protoc-gen-crd:duration-validation:none - BlackoutPeriod *duration.Duration `protobuf:"bytes,1,opt,name=blackout_period,json=blackoutPeriod,proto3" json:"blackout_period,omitempty"` + WeightStabilizationPeriod *duration.Duration `protobuf:"bytes,1,opt,name=weight_stabilization_period,json=weightStabilizationPeriod,proto3" json:"weight_stabilization_period,omitempty"` // If an endpoint stops reporting utilization metrics for this long, // its reported weight is discarded and it reverts to the default // (equal) weight. @@ -2555,10 +2555,16 @@ type LoadBalancerSettings_BackendUtilizationLB struct { // Default is 0 (disabled). // +kubebuilder:validation:Minimum=0 ErrorUtilizationPenaltyPercent uint32 `protobuf:"varint,4,opt,name=error_utilization_penalty_percent,json=errorUtilizationPenaltyPercent,proto3" json:"error_utilization_penalty_percent,omitempty"` - // Custom ORCA metric names used to compute utilization when the - // standard `application_utilization` metric is not available from the - // backend. When set, these metrics are used in the weight formula - // instead of the default. + // Custom ORCA metric names used to compute utilization. Check + // [ORCA Protocol](https://github.com/cncf/xds/blob/main/xds/data/orca/v3/orca_load_report.proto) + // for available metrics. For map fields in the ORCA proto, + // the string will be of the form `.`. + // For example, the string `named_metrics.foo`. + // + // If not specified, the load balancer will use the standard + // `application_utilization` metric. + // If specified, the utilization is the max of the values of + // the metrics specified here, when that max is greater than 0. MetricNamesForComputingUtilization []string `protobuf:"bytes,5,rep,name=metric_names_for_computing_utilization,json=metricNamesForComputingUtilization,proto3" json:"metric_names_for_computing_utilization,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2594,9 +2600,9 @@ func (*LoadBalancerSettings_BackendUtilizationLB) Descriptor() ([]byte, []int) { return file_networking_v1alpha3_destination_rule_proto_rawDescGZIP(), []int{3, 1} } -func (x *LoadBalancerSettings_BackendUtilizationLB) GetBlackoutPeriod() *duration.Duration { +func (x *LoadBalancerSettings_BackendUtilizationLB) GetWeightStabilizationPeriod() *duration.Duration { if x != nil { - return x.BlackoutPeriod + return x.WeightStabilizationPeriod } return nil } @@ -3461,7 +3467,7 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x0etraffic_policy\x18\x03 \x01(\v2(.istio.networking.v1alpha3.TrafficPolicyR\rtrafficPolicy\x1a9\n" + "\vLabelsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x84\x11\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x9b\x11\n" + "\x14LoadBalancerSettings\x12R\n" + "\x06simple\x18\x01 \x01(\x0e28.istio.networking.v1alpha3.LoadBalancerSettings.SimpleLBH\x00R\x06simple\x12k\n" + "\x0fconsistent_hash\x18\x02 \x01(\v2@.istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLBH\x00R\x0econsistentHash\x12w\n" + @@ -3497,9 +3503,9 @@ const file_networking_v1alpha3_destination_rule_proto_rawDesc = "" + "\x05value\x18\x02 \x01(\tR\x05valueB\n" + "\n" + "\bhash_keyB\x10\n" + - "\x0ehash_algorithm\x1a\x9b\x03\n" + - "\x14BackendUtilizationLB\x12B\n" + - "\x0fblackout_period\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x0eblackoutPeriod\x12S\n" + + "\x0ehash_algorithm\x1a\xb2\x03\n" + + "\x14BackendUtilizationLB\x12Y\n" + + "\x1bweight_stabilization_period\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\x19weightStabilizationPeriod\x12S\n" + "\x18weight_expiration_period\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x16weightExpirationPeriod\x12K\n" + "\x14weight_update_period\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x12weightUpdatePeriod\x12I\n" + "!error_utilization_penalty_percent\x18\x04 \x01(\rR\x1eerrorUtilizationPenaltyPercent\x12R\n" + @@ -3713,7 +3719,7 @@ var file_networking_v1alpha3_destination_rule_proto_depIdxs = []int32{ 23, // 46: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.http_cookie:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie 21, // 47: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.ring_hash:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.RingHash 22, // 48: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.maglev:type_name -> istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.MagLev - 34, // 49: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.blackout_period:type_name -> google.protobuf.Duration + 34, // 49: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.weight_stabilization_period:type_name -> google.protobuf.Duration 34, // 50: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.weight_expiration_period:type_name -> google.protobuf.Duration 34, // 51: istio.networking.v1alpha3.LoadBalancerSettings.BackendUtilizationLB.weight_update_period:type_name -> google.protobuf.Duration 34, // 52: istio.networking.v1alpha3.LoadBalancerSettings.ConsistentHashLB.HTTPCookie.ttl:type_name -> google.protobuf.Duration diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index 06c3a6c17c..ed69f73854 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -948,7 +948,7 @@
Attribute

BackendUtilizationLB

-

Client-side weighted round-robin load balancing policy that uses +

BackendUtilizationLB load balancing policy that uses backend-reported utilization metrics (ORCA) to dynamically adjust endpoint weights. Endpoints that report higher utilization receive proportionally fewer requests. Endpoints that have not yet reported @@ -965,8 +965,8 @@

BackendUtilizationLB

- - + diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index cb44d83648..005c6c7d37 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -560,7 +560,7 @@ message LoadBalancerSettings { uint64 minimum_ring_size = 4 [deprecated = true]; } - // Client-side weighted round-robin load balancing policy that uses + // BackendUtilizationLB load balancing policy that uses // backend-reported utilization metrics (ORCA) to dynamically adjust // endpoint weights. Endpoints that report higher utilization receive // proportionally fewer requests. Endpoints that have not yet reported @@ -575,7 +575,7 @@ message LoadBalancerSettings { // same weight as endpoints without metrics. // Default is 10s. // +protoc-gen-crd:duration-validation:none - google.protobuf.Duration blackout_period = 1; + google.protobuf.Duration weight_stabilization_period = 1; // If an endpoint stops reporting utilization metrics for this long, // its reported weight is discarded and it reverts to the default @@ -599,10 +599,16 @@ message LoadBalancerSettings { // +kubebuilder:validation:Minimum=0 uint32 error_utilization_penalty_percent = 4; - // Custom ORCA metric names used to compute utilization when the - // standard `application_utilization` metric is not available from the - // backend. When set, these metrics are used in the weight formula - // instead of the default. + // Custom ORCA metric names used to compute utilization. Check + // [ORCA Protocol](https://github.com/cncf/xds/blob/main/xds/data/orca/v3/orca_load_report.proto) + // for available metrics. For map fields in the ORCA proto, + // the string will be of the form `.`. + // For example, the string `named_metrics.foo`. + // + // If not specified, the load balancer will use the standard + // `application_utilization` metric. + // If specified, the utilization is the max of the values of + // the metrics specified here, when that max is greater than 0. repeated string metric_names_for_computing_utilization = 5; } diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index 84c6a2d329..8c36d587af 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -206,7 +206,7 @@ type LoadBalancerSettings_ConsistentHashLB_RingHash_ = v1alpha3.LoadBalancerSett // The Maglev load balancer implements consistent hashing to backend hosts. type LoadBalancerSettings_ConsistentHashLB_Maglev = v1alpha3.LoadBalancerSettings_ConsistentHashLB_Maglev -// Client-side weighted round-robin load balancing policy that uses +// BackendUtilizationLB load balancing policy that uses // backend-reported utilization metrics (ORCA) to dynamically adjust // endpoint weights. Endpoints that report higher utilization receive // proportionally fewer requests. Endpoints that have not yet reported diff --git a/releasenotes/notes/backend-utilization-lb.yaml b/releasenotes/notes/backend-utilization-lb.yaml index c93104eb4d..6a3b61b292 100644 --- a/releasenotes/notes/backend-utilization-lb.yaml +++ b/releasenotes/notes/backend-utilization-lb.yaml @@ -5,6 +5,6 @@ issue: [] releaseNotes: - | **Added** `backendUtilization` load balancing policy to `DestinationRule`, - enabling client-side weighted round-robin based on backend-reported ORCA + enabling BackendUtilizationLB based on backend-reported ORCA utilization metrics. Endpoints reporting higher utilization automatically - receive fewer requests. \ No newline at end of file + receive fewer requests. From bafac1f14ff6296d3b3a0166e2973763d314d29c Mon Sep 17 00:00:00 2001 From: wbpcode Date: Wed, 12 Aug 2026 21:51:32 +0800 Subject: [PATCH 5/5] address comments Signed-off-by: wbpcode --- networking/v1/destination_rule_alias.gen.go | 2 +- networking/v1alpha3/destination_rule.pb.go | 4 ++-- networking/v1alpha3/destination_rule.pb.html | 4 ++-- networking/v1alpha3/destination_rule.proto | 4 ++-- networking/v1beta1/destination_rule_alias.gen.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/networking/v1/destination_rule_alias.gen.go b/networking/v1/destination_rule_alias.gen.go index 16d5d39a62..1c6965633b 100644 --- a/networking/v1/destination_rule_alias.gen.go +++ b/networking/v1/destination_rule_alias.gen.go @@ -153,7 +153,7 @@ type Subset = v1alpha3.Subset // trafficPolicy: // loadBalancer: // backendUtilization: -// blackoutPeriod: 10s +// weightStabilizationPeriod: 10s // weightExpirationPeriod: 3m // weightUpdatePeriod: 1s // diff --git a/networking/v1alpha3/destination_rule.pb.go b/networking/v1alpha3/destination_rule.pb.go index 30a2ed5ba6..0f46bf4249 100644 --- a/networking/v1alpha3/destination_rule.pb.go +++ b/networking/v1alpha3/destination_rule.pb.go @@ -818,7 +818,7 @@ func (x *Subset) GetTrafficPolicy() *TrafficPolicy { // trafficPolicy: // loadBalancer: // backendUtilization: -// blackoutPeriod: 10s +// weightStabilizationPeriod: 10s // weightExpirationPeriod: 3m // weightUpdatePeriod: 1s // @@ -2531,7 +2531,7 @@ func (*LoadBalancerSettings_ConsistentHashLB_Maglev) isLoadBalancerSettings_Cons type LoadBalancerSettings_BackendUtilizationLB struct { state protoimpl.MessageState `protogen:"open.v1"` // Duration after an endpoint first reports metrics before its weight - // is trusted. During the blackout period the endpoint receives the + // is trusted. During the stabilization period the endpoint receives the // same weight as endpoints without metrics. // Default is 10s. // +protoc-gen-crd:duration-validation:none diff --git a/networking/v1alpha3/destination_rule.pb.html b/networking/v1alpha3/destination_rule.pb.html index ed69f73854..066d0d08b4 100644 --- a/networking/v1alpha3/destination_rule.pb.html +++ b/networking/v1alpha3/destination_rule.pb.html @@ -621,7 +621,7 @@

LoadBalancerSettings

trafficPolicy: loadBalancer: backendUtilization: - blackoutPeriod: 10s + weightStabilizationPeriod: 10s weightExpirationPeriod: 3m weightUpdatePeriod: 1s @@ -971,7 +971,7 @@

BackendUtilizationLB

FieldDescription
+

Duration after an endpoint first reports metrics before its weight +is trusted. During the blackout period the endpoint receives the +same weight as endpoints without metrics. +Default is 10s.

+ +
+

If an endpoint stops reporting utilization metrics for this long, +its reported weight is discarded and it reverts to the default +(equal) weight. +Default is 3m.

+ +
+

How often the load balancer recomputes endpoint weights from the +latest reported utilization data. Smaller values react faster but +increase CPU overhead. Minimum 100ms. +Default is 1s.

+ +
+

Additional penalty applied to endpoints that return errors, +expressed as a percentage of the utilization. For example, a value +of 100 means the error rate is weighted 1.0x, and 150 means 1.5x. +A value of 0 disables the penalty. +Default is 0 (disabled).

+ +
+

Custom ORCA metric names used to compute utilization when the +standard application_utilization metric is not available from the +backend. When set, these metrics are used in the weight formula +instead of the default.

+
@@ -1019,10 +1019,15 @@

BackendUtilizationLB

string[]
-

Custom ORCA metric names used to compute utilization when the -standard application_utilization metric is not available from the -backend. When set, these metrics are used in the weight formula -instead of the default.

+

Custom ORCA metric names used to compute utilization. Check +ORCA Protocol +for available metrics. For map fields in the ORCA proto, +the string will be of the form <map_field_name>.<map_key>. +For example, the string named_metrics.foo.

+

If not specified, the load balancer will use the standard +application_utilization metric. +If specified, the utilization is the max of the values of +the metrics specified here, when that max is greater than 0.

Duration after an endpoint first reports metrics before its weight -is trusted. During the blackout period the endpoint receives the +is trusted. During the stabilization period the endpoint receives the same weight as endpoints without metrics. Default is 10s.

diff --git a/networking/v1alpha3/destination_rule.proto b/networking/v1alpha3/destination_rule.proto index 005c6c7d37..1d99795e3e 100644 --- a/networking/v1alpha3/destination_rule.proto +++ b/networking/v1alpha3/destination_rule.proto @@ -428,7 +428,7 @@ message Subset { // trafficPolicy: // loadBalancer: // backendUtilization: -// blackoutPeriod: 10s +// weightStabilizationPeriod: 10s // weightExpirationPeriod: 3m // weightUpdatePeriod: 1s // ``` @@ -571,7 +571,7 @@ message LoadBalancerSettings { // load balancing policy. message BackendUtilizationLB { // Duration after an endpoint first reports metrics before its weight - // is trusted. During the blackout period the endpoint receives the + // is trusted. During the stabilization period the endpoint receives the // same weight as endpoints without metrics. // Default is 10s. // +protoc-gen-crd:duration-validation:none diff --git a/networking/v1beta1/destination_rule_alias.gen.go b/networking/v1beta1/destination_rule_alias.gen.go index 8c36d587af..f6d1a9059e 100644 --- a/networking/v1beta1/destination_rule_alias.gen.go +++ b/networking/v1beta1/destination_rule_alias.gen.go @@ -153,7 +153,7 @@ type Subset = v1alpha3.Subset // trafficPolicy: // loadBalancer: // backendUtilization: -// blackoutPeriod: 10s +// weightStabilizationPeriod: 10s // weightExpirationPeriod: 3m // weightUpdatePeriod: 1s //