Skip to content

Commit

Permalink
LB policy: add client-side weighted round robin LB policy config (env…
Browse files Browse the repository at this point in the history
…oyproxy#24520)

Signed-off-by: Mark D. Roth <[email protected]>
  • Loading branch information
markdroth authored Jan 10, 2023
1 parent 19cbd8f commit 136c258
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.

load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")

licenses(["notice"]) # Apache 2

api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
syntax = "proto3";

package envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3;

import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";

import "udpa/annotations/status.proto";

option java_package = "io.envoyproxy.envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3";
option java_outer_classname = "ClientSideWeightedRoundRobinProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3;client_side_weighted_round_robinv3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: Client-Side Weighted Round Robin Load Balancing Policy]
// [#not-implemented-hide:]

// Configuration for the client_side_weighted_round_robin LB policy.
//
// This policy differs from the built-in ROUND_ROBIN policy in terms of
// how the endpoint weights are determined. In the ROUND_ROBIN policy,
// the endpoint weights are sent by the control plane via EDS. However,
// in this policy, the endpoint weights are instead determined via
// qps and CPU utilization metrics sent by the endpoint using the Open
// Request Cost Aggregation (ORCA) protocol. The weight of a given endpoint
// is computed as qps / cpu_utilization.
//
// See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
//
// [#next-free-field: 6]
message ClientSideWeightedRoundRobin {
// Whether to enable out-of-band utilization reporting collection from
// the endpoints. By default, per-request utilization reporting is used.
google.protobuf.BoolValue enable_oob_load_report = 1;

// Load reporting interval to request from the server. Note that the
// server may not provide reports as frequently as the client requests.
// Used only when enable_oob_load_report is true. Default is 10 seconds.
google.protobuf.Duration oob_reporting_period = 2;

// A given endpoint must report load metrics continuously for at least
// this long before the endpoint weight will be used. This avoids
// churn when the set of endpoint addresses changes. Takes effect
// both immediately after we establish a connection to an endpoint and
// after weight_expiration_period has caused us to stop using the most
// recent load metrics. Default is 10 seconds.
google.protobuf.Duration blackout_period = 3;

// If a given endpoint has not reported load metrics in this long,
// then we stop using the reported weight. This ensures that we do
// not continue to use very stale weights. Once we stop using a stale
// value, if we later start seeing fresh reports again, the
// blackout_period applies. Defaults to 3 minutes.
google.protobuf.Duration weight_expiration_period = 4;

// How often endpoint weights are recalculated. Default is 1 second.
google.protobuf.Duration weight_update_period = 5;
}
1 change: 1 addition & 0 deletions api/versioning/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ proto_library(
"//envoy/extensions/internal_redirect/previous_routes/v3:pkg",
"//envoy/extensions/internal_redirect/safe_cross_scheme/v3:pkg",
"//envoy/extensions/key_value/file_based/v3:pkg",
"//envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3:pkg",
"//envoy/extensions/load_balancing_policies/common/v3:pkg",
"//envoy/extensions/load_balancing_policies/least_request/v3:pkg",
"//envoy/extensions/load_balancing_policies/maglev/v3:pkg",
Expand Down
2 changes: 2 additions & 0 deletions tools/spelling/spelling_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ OID
OK
OOM
OOMs
ORCA
OS
OSI
OSS
Expand Down Expand Up @@ -960,6 +961,7 @@ ocagent
offsetof
oneof
oneway
oob
opcode
opencensus
openssl
Expand Down

0 comments on commit 136c258

Please sign in to comment.