-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
ClientSideWeightedRoundRobin
LB Policy. (#35905)
Commit Message: - Add `ClientSideWeightedRoundRobinLoadBalancer`. - Attach `ClientSideHostLbPolicyData` to each `Host`. - Add `OrcaLoadReportCallbacks` callback to each `LoadBalancerContext`. - Calculate weights in `Host::ClientSideHostLbPolicyData` based on OrcaLoadReport. - Periodically update `Host::weight` for load balancing using calculated weights. - Add `host` reference to `OrcaLoadReportCallbacks::onOrcaLoadReport` callback. Risk Level: low Testing: `bazel test //test/extensions/load_balancing_policies/client_side_weighted_round_robin/...` Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a #34777 --------- Signed-off-by: Misha Efimov <[email protected]>
- Loading branch information
Showing
28 changed files
with
1,552 additions
and
46 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
source/extensions/load_balancing_policies/client_side_weighted_round_robin/BUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load( | ||
"//bazel:envoy_build_system.bzl", | ||
"envoy_cc_extension", | ||
"envoy_cc_library", | ||
"envoy_extension_package", | ||
) | ||
|
||
licenses(["notice"]) # Apache 2 | ||
|
||
envoy_extension_package() | ||
|
||
envoy_cc_extension( | ||
name = "config", | ||
srcs = ["config.cc"], | ||
hdrs = ["config.h"], | ||
deps = [ | ||
":client_side_weighted_round_robin_lb_lib", | ||
"//source/common/common:minimal_logger_lib", | ||
"//source/common/upstream:load_balancer_context_base_lib", | ||
"//source/extensions/load_balancing_policies/common:factory_base", | ||
"@envoy_api//envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3:pkg_cc_proto", | ||
], | ||
) | ||
|
||
envoy_cc_library( | ||
name = "client_side_weighted_round_robin_lb_lib", | ||
srcs = ["client_side_weighted_round_robin_lb.cc"], | ||
hdrs = ["client_side_weighted_round_robin_lb.h"], | ||
deps = [ | ||
"//source/common/orca:orca_load_metrics_lib", | ||
"//source/extensions/load_balancing_policies/common:load_balancer_lib", | ||
"//source/extensions/load_balancing_policies/round_robin:round_robin_lb_lib", | ||
"@com_github_cncf_xds//xds/data/orca/v3:pkg_cc_proto", | ||
"@envoy_api//envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3:pkg_cc_proto", | ||
], | ||
) |
Oops, something went wrong.