Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
444 changes: 444 additions & 0 deletions kubernetes/customresourcedefinitions.gen.yaml

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions networking/v1/destination_rule_alias.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

368 changes: 269 additions & 99 deletions networking/v1alpha3/destination_rule.pb.go

Large diffs are not rendered by default.

116 changes: 115 additions & 1 deletion networking/v1alpha3/destination_rule.pb.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 75 additions & 0 deletions networking/v1alpha3/destination_rule.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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:
// weightStabilizationPeriod: 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.
Expand Down Expand Up @@ -542,13 +560,70 @@ message LoadBalancerSettings {
uint64 minimum_ring_size = 4 [deprecated = true];
}

// 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
// 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 stabilization period the endpoint receives the
// same weight as endpoints without metrics.
// Default is 10s.
// +protoc-gen-crd:duration-validation:none
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
// (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,
// 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. 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 `<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.
repeated string metric_names_for_computing_utilization = 5;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. I added a little more comment to make it more clear, one the the biggest value will be used if the custom metrics are specified.

}

// Upstream load balancing policy.
oneof lb_policy {
// Standard load balancing algorithms that require no tuning.
SimpleLB simple = 1;

// 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
Expand Down
21 changes: 21 additions & 0 deletions networking/v1alpha3/destination_rule_deepcopy.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions networking/v1alpha3/destination_rule_json.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading