Skip to content

Commit 5e955e8

Browse files
committed
proto and docs
Signed-off-by: jukie <10012479+jukie@users.noreply.github.com>
1 parent ccb42a3 commit 5e955e8

15 files changed

Lines changed: 807 additions & 0 deletions

File tree

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ extensions/upstreams/tcp @ggreenway @mattklein123
387387
/*/extensions/load_balancing_policies/client_side_weighted_round_robin @wbpcode @adisuissa @efimki
388388
/*/extensions/load_balancing_policies/override_host @yanavlasov @tonya11en
389389
/*/extensions/load_balancing_policies/wrr_locality @wbpcode @adisuissa @efimki
390+
/*/extensions/load_balancing_policies/load_aware_locality @tonya11en @jukie
390391
# Early header mutation
391392
/*/extensions/http/early_header_mutation/header_mutation @wbpcode @tyxia
392393
# Network matching extensions

api/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ proto_library(
345345
"//envoy/extensions/load_balancing_policies/common/v3:pkg",
346346
"//envoy/extensions/load_balancing_policies/dynamic_modules/v3:pkg",
347347
"//envoy/extensions/load_balancing_policies/least_request/v3:pkg",
348+
"//envoy/extensions/load_balancing_policies/load_aware_locality/v3:pkg",
348349
"//envoy/extensions/load_balancing_policies/maglev/v3:pkg",
349350
"//envoy/extensions/load_balancing_policies/override_host/v3:pkg",
350351
"//envoy/extensions/load_balancing_policies/pick_first/v3:pkg",
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
2+
3+
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
4+
5+
licenses(["notice"]) # Apache 2
6+
7+
api_proto_package(
8+
deps = [
9+
"//envoy/config/cluster/v3:pkg",
10+
"@xds//udpa/annotations:pkg",
11+
],
12+
)
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
syntax = "proto3";
2+
3+
package envoy.extensions.load_balancing_policies.load_aware_locality.v3;
4+
5+
import "envoy/config/cluster/v3/cluster.proto";
6+
7+
import "google/protobuf/duration.proto";
8+
import "google/protobuf/wrappers.proto";
9+
10+
import "udpa/annotations/status.proto";
11+
import "validate/validate.proto";
12+
13+
option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.load_aware_locality.v3";
14+
option java_outer_classname = "LoadAwareLocalityProto";
15+
option java_multiple_files = true;
16+
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/load_aware_locality/v3;load_aware_localityv3";
17+
option (udpa.annotations.file_status).package_version_status = ACTIVE;
18+
19+
// [#protodoc-title: Load-Aware Locality-Picking Load Balancing Policy]
20+
// [#extension: envoy.load_balancing_policies.load_aware_locality]
21+
22+
// Configuration for the load_aware_locality LB policy which uses ORCA utilization data
23+
// to route traffic between localities based on available headroom.
24+
// [#next-free-field: 8]
25+
message LoadAwareLocality {
26+
// The child LB policy to create for endpoint-picking within each locality.
27+
config.cluster.v3.LoadBalancingPolicy endpoint_picking_policy = 1
28+
[(validate.rules).message = {required: true}];
29+
30+
// How frequently ORCA weights and locality utilization are recomputed on the
31+
// main thread. Defaults to 1s.
32+
google.protobuf.Duration weight_update_period = 2;
33+
34+
// Named metrics from ORCA reports to use for computing utilization.
35+
// When configured, endpoint utilization is computed by taking the max of the
36+
// values of these metrics. For map fields in the ORCA proto, the string will
37+
// be of the form ``<map_field_name>.<map_key>``. For example, the string
38+
// ``named_metrics.foo`` will look for the key ``foo`` in the ORCA
39+
// :ref:`named_metrics <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.named_metrics>`
40+
// field. If this field is not configured or none of the specified metrics are
41+
// present in the load report, then
42+
// :ref:`application_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.application_utilization>`
43+
// is used instead. If that field is also not set or is zero, then
44+
// :ref:`cpu_utilization <envoy_v3_api_field_.xds.data.orca.v3.OrcaLoadReport.cpu_utilization>`
45+
// is used.
46+
repeated string metric_names_for_computing_utilization = 3;
47+
48+
// When the local locality's utilization is at most this threshold above the
49+
// remote average, route 100% of traffic to the local locality. This avoids
50+
// unnecessary cross-zone routing when utilization is roughly balanced.
51+
// Must be in [0, 1]. Defaults to 0.1.
52+
google.protobuf.DoubleValue utilization_variance_threshold = 4
53+
[(validate.rules).double = {lte: 1.0 gte: 0.0}];
54+
55+
// EWMA smoothing factor for per-locality utilization. Must be in (0, 1].
56+
// Higher values react faster to changes, lower values are more stable.
57+
// Defaults to 0.3.
58+
google.protobuf.DoubleValue ewma_alpha = 5 [(validate.rules).double = {lte: 1.0 gt: 0.0}];
59+
60+
// Minimum fraction of traffic sent to non-local localities to keep
61+
// ORCA data fresh. Applied even in all_local mode. Must be in [0, 1).
62+
// Set to 0 to disable. Defaults to 0.03 (3%).
63+
google.protobuf.DoubleValue probe_percentage = 6 [(validate.rules).double = {lt: 1.0 gte: 0.0}];
64+
65+
// If a given endpoint has not reported load metrics in this long, then we
66+
// stop using the reported weight. This ensures that we do not continue to
67+
// use very stale weights. Set to 0s to disable expiration. Defaults to 3 minutes.
68+
google.protobuf.Duration weight_expiration_period = 7 [(validate.rules).duration = {gte {}}];
69+
}

api/versioning/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ proto_library(
284284
"//envoy/extensions/load_balancing_policies/common/v3:pkg",
285285
"//envoy/extensions/load_balancing_policies/dynamic_modules/v3:pkg",
286286
"//envoy/extensions/load_balancing_policies/least_request/v3:pkg",
287+
"//envoy/extensions/load_balancing_policies/load_aware_locality/v3:pkg",
287288
"//envoy/extensions/load_balancing_policies/maglev/v3:pkg",
288289
"//envoy/extensions/load_balancing_policies/override_host/v3:pkg",
289290
"//envoy/extensions/load_balancing_policies/pick_first/v3:pkg",

changelogs/current.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,14 @@ new_features:
393393
change: |
394394
Added a per-connection filter state object to select a workload trust domain in the SPIFFE validator in
395395
the multi-tenant deployments.
396+
- area: load_balancing
397+
change: |
398+
Added :ref:`load-aware locality LB policy
399+
<envoy_v3_api_msg_extensions.load_balancing_policies.load_aware_locality.v3.LoadAwareLocality>`
400+
that uses ORCA utilization data to distribute traffic across localities based on real-time
401+
headroom. The policy computes per-locality EWMA utilization from endpoint ORCA reports and
402+
shifts traffic away from overloaded localities while respecting a configurable variance
403+
threshold and probe percentage to keep telemetry fresh.
396404
- area: tls
397405
change: |
398406
Extended TLS certificate compression (RFC 8879): added brotli to QUIC (which already supported zlib),

0 commit comments

Comments
 (0)