Skip to content

Commit

Permalink
api: add error_utilization_penalty param to WRR (envoyproxy#25868)
Browse files Browse the repository at this point in the history
Client-wide WRR added with envoyproxy#24520 needs to support the weight penalty using the error rate. This change adds a parameter that configures this behavior.

Risk Level: Low
Testing: N/A

Signed-off-by: Yousuk Seung <[email protected]>
  • Loading branch information
yousukseung authored Mar 9, 2023
1 parent 20a83f5 commit d5ab0a6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// 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.
// qps (queries per second), eps (errors per second), and CPU utilization
// metrics sent by the endpoint using the Open Request Cost Aggregation (ORCA)
// protocol. A query counts towards qps when successful, otherwise towards both
// qps and eps. What counts as an error is up to the endpoint to define.
// A config parameter error_utilization_penalty controls the penalty to adjust
// endpoint weights using eps and qps. The weight of a given endpoint is
// computed as: qps / (cpu_utilization + eps/qps * error_utilization_penalty)
//
// See the :ref:`load balancing architecture overview<arch_overview_load_balancing_types>` for more information.
//
// [#next-free-field: 6]
// [#next-free-field: 7]
message ClientSideWeightedRoundRobin {
// Whether to enable out-of-band utilization reporting collection from
// the endpoints. By default, per-request utilization reporting is used.
Expand Down Expand Up @@ -56,4 +60,8 @@ message ClientSideWeightedRoundRobin {

// How often endpoint weights are recalculated. Default is 1 second.
google.protobuf.Duration weight_update_period = 5;

// The multiplier used to adjust endpoint weights with the error rate
// calculated as eps/qps. Default is 1.0.
google.protobuf.FloatValue error_utilization_penalty = 6;
}
1 change: 1 addition & 0 deletions tools/spelling/spelling_dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ dereferencing
differentially
dnsresolvers
endpos
eps
fo
ghi
golang
Expand Down

0 comments on commit d5ab0a6

Please sign in to comment.