Skip to content
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

adaptive provider flow control and consumer balance algorithm #10642

Open
wants to merge 24 commits into
base: 3.2
Choose a base branch
from

Conversation

LQLlulu
Copy link

@LQLlulu LQLlulu commented Sep 20, 2022

What is the purpose of the change

The P2C with least active load balance algorithm is implemented.

使用方法:
自适应限流部分的使用方法:
要确保服务端存在多个节点,并且消费端开启重试策略的前提下,限流功能才能更好的发挥作用。
设置方法与静态的最大并发值设置类似,只需在provider端将"flowcontrol"设置为"autoConcurrencyLimier"或者"heuristicSmoothingFlowControl"即可。

实验效果
负载均衡部分:
image
image

自适应限流部分
image

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Merging #10642 (2c4fd60) into 3.1 (e893407) will increase coverage by 0.03%.
The diff coverage is 74.41%.

@@             Coverage Diff              @@
##                3.1   #10642      +/-   ##
============================================
+ Coverage     65.20%   65.24%   +0.03%     
- Complexity      493      494       +1     
============================================
  Files          1336     1338       +2     
  Lines         56932    57018      +86     
  Branches       8438     8451      +13     
============================================
+ Hits          37123    37201      +78     
- Misses        15840    15845       +5     
- Partials       3969     3972       +3     
Impacted Files Coverage Δ
.../cluster/loadbalance/AdaptivePowerOfTwoChoice.java 74.28% <74.28%> (ø)
...r/loadbalance/PowerOfTwoChoiceWithLeastActive.java 75.00% <75.00%> (ø)
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 79.59% <0.00%> (-12.25%) ⬇️
...mmon/serialize/fastjson2/FastJson2ObjectInput.java 56.25% <0.00%> (-6.25%) ⬇️
...ubbo/registry/client/AbstractServiceDiscovery.java 81.34% <0.00%> (-1.50%) ⬇️
...ting/zookeeper/curator/CuratorZookeeperClient.java 69.65% <0.00%> (-0.86%) ⬇️
...apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java 62.93% <0.00%> (-0.70%) ⬇️
...he/dubbo/registry/zookeeper/ZookeeperRegistry.java 61.05% <0.00%> (-0.53%) ⬇️
...rg/apache/dubbo/common/timer/HashedWheelTimer.java 85.56% <0.00%> (-0.35%) ⬇️
...n/java/org/apache/dubbo/common/utils/NetUtils.java 62.94% <0.00%> (-0.28%) ⬇️
... and 13 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@LQLlulu LQLlulu changed the title P2C load balance algorithm adaptive provider flow control and consumer balance algorithm Nov 25, 2022
@chickenlj chickenlj changed the base branch from 3.1 to 3.2 February 8, 2023 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants