-
Notifications
You must be signed in to change notification settings - Fork 5.3k
load balancer: added least request/random/round robin load balancer extension #23472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
5b75816
load balancer: update related methodsfor load balancer extensions
d5947bb
load balancer: added least request load balancer extension
61520ae
fix build and make it just run
51ba30b
Merge branch 'main' of https://github.com/envoyproxy/envoy into dev-l…
fd728ce
reverse unnecessary update
89c1582
add test
8f69022
fix docs, release note, format and everything
2c9b321
revert unexpected deltetion
2fc6360
try for coverage
0654452
update per file coverage
49e880d
Merge branch 'main' of https://github.com/envoyproxy/envoy into dev-l…
35688c4
Merge branch 'main' of https://github.com/envoyproxy/envoy into dev-l…
5fc44ed
upate all
b8e0978
fix format
560c051
fix test
40eaf43
fix test
f937219
full namespace for random generator
5a331b3
Merge branch 'main' of https://github.com/envoyproxy/envoy into dev-l…
6c27a1a
update change log
3db7808
more docs
bd88fdd
add some integration test
82b05d0
fix test and update assert
1e6e1a6
fix test for ipv6
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -42,3 +42,4 @@ Extensions | |
| upstream/upstream | ||
| wasm/wasm | ||
| watchdog/watchdog | ||
| load_balancing_policies/load_balancing_policies | ||
10 changes: 10 additions & 0 deletions
10
docs/root/api-v3/config/load_balancing_policies/load_balancing_policies.rst
This file contains hidden or 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,10 @@ | ||
| .. _envoy_v3_api_config_load_balancer_policies: | ||
|
|
||
| Load balancing policies | ||
| ======================= | ||
|
|
||
| .. toctree:: | ||
| :glob: | ||
| :maxdepth: 2 | ||
|
|
||
| ../../extensions/load_balancing_policies/*/v3/* |
39 changes: 39 additions & 0 deletions
39
docs/root/intro/arch_overview/upstream/load_balancing_policies.rst
This file contains hidden or 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,39 @@ | ||
| Load balancing policies | ||
| ======================= | ||
|
|
||
| Extendable load balancing policies could be configured for each cluster by | ||
| :ref:`load balancer policy <envoy_v3_api_field_config.cluster.v3.Cluster.load_balancing_policy>`. | ||
| And the developer can implement a custom load balancing policy and configured it. | ||
|
|
||
|
|
||
| See built-in load balancing policies by :ref:`APIs <envoy_v3_api_config_load_balancer_policies>`. | ||
|
|
||
|
|
||
| :ref:`Enum based load balancing policies <envoy_v3_api_field_config.cluster.v3.Cluster.lb_policy>` | ||
| will be suupported for backward compatibility and marked as deprecated. The new extendable load | ||
| balancing policies should be used as a priority if the related policies are implemented. | ||
|
|
||
|
|
||
| Use :ref:`random load balancing policy <envoy_v3_api_msg_extensions.load_balancing_policies.random.v3.Random>` | ||
| as an example: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| name: example_cluster | ||
| type: STRICT_DNS | ||
| connect_timeout: 0.25s | ||
| load_assignment: | ||
| cluster_name: example_cluster | ||
| endpoints: | ||
| - lb_endpoints: | ||
| - endpoint: | ||
| address: | ||
| socket_address: | ||
| address: example.com | ||
| port_value: 80 | ||
| load_balancing_policy: | ||
| policies: | ||
| - typed_extension_config: | ||
| name: envoy.load_balancing_policies.random | ||
| typed_config: | ||
| "@type": type.googleapis.com/envoy.extensions.load_balancing_policies.random.v3.Random |
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -17,3 +17,4 @@ Upstream clusters | |
| circuit_breaking | ||
| upstream_filters | ||
| load_reporting_service | ||
| load_balancing_policies | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also added random and round robin, right? Can we add more documentation somewhere in when/why/how to use these new extensions? It's not clear from the end user perspective when/why they are supposed to use this new mechanism?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get it. I will add a doc for these new type extensions.