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

Add interleaved weighted round-robin and alias-method loadbalancer #2606

Merged
merged 3 commits into from
Mar 8, 2024

Conversation

NX-Official
Copy link
Contributor

@NX-Official NX-Official commented Mar 4, 2024

Add two algorithm of loadbalancer : interleaved weighted round-robin(iwrr) and alias method from cloudwego/kitex.

ref: cloudwego/kitex#1199
ref: cloudwego/kitex#1019

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 87.96992% with 16 lines in your changes are missing coverage. Please review.

Project coverage is 47.73%. Comparing base (ae70398) to head (de6b703).
Report is 1 commits behind head on main.

Files Patch % Lines
cluster/loadbalance/aliasmethod/alias_method.go 88.46% 4 Missing and 2 partials ⚠️
cluster/loadbalance/iwrr/iwrr.go 89.47% 3 Missing and 3 partials ⚠️
cluster/loadbalance/aliasmethod/loadbalance.go 83.33% 1 Missing and 1 partial ⚠️
cluster/loadbalance/iwrr/loadbalance.go 83.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2606      +/-   ##
==========================================
+ Coverage   47.55%   47.73%   +0.17%     
==========================================
  Files         336      341       +5     
  Lines       24839    24994     +155     
==========================================
+ Hits        11813    11930     +117     
- Misses      11877    11910      +33     
- Partials     1149     1154       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justxuewei
Copy link
Member

justxuewei commented Mar 4, 2024

Thanks for your contribution, @NX-Official! No need to add Reapply in your commit title and your PR's title.

@NX-Official NX-Official changed the title Reapply interleaved weighted round-robin and alias-method loadbalancer Add interleaved weighted round-robin and alias-method loadbalancer Mar 4, 2024
Copy link
Contributor

@chickenlj chickenlj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Is there any documentation describing the advantages of these strategies?

@NX-Official
Copy link
Contributor Author

Can we merge this PR or there has something else to do ?

@justxuewei
Copy link
Member

There is an issue:

Is there any documentation describing the advantages of these strategies?

Could you add some comments to docs.go? For example, a Wikipedia link that introduces those algorithms.

Copy link

sonarqubecloud bot commented Mar 7, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
11.5% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@justxuewei justxuewei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks!

Copy link
Member

@FinalT FinalT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@chickenlj chickenlj merged commit b645659 into apache:main Mar 8, 2024
5 checks passed
FoghostCn pushed a commit to FoghostCn/dubbo-go that referenced this pull request Mar 27, 2024
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.

5 participants