apache / dubbo-go

Go Implementation For Apache Dubbo .
https://dubbo.apache.org/
Apache License 2.0
4.69k stars 917 forks source link

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

Closed NX-Official closed 7 months ago

NX-Official commented 7 months ago

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

ref: https://github.com/cloudwego/kitex/pull/1199 ref: https://github.com/cloudwego/kitex/pull/1019

codecov-commenter commented 7 months ago

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 :warning:
cluster/loadbalance/iwrr/iwrr.go 89.47% 3 Missing and 3 partials :warning:
cluster/loadbalance/aliasmethod/loadbalance.go 83.33% 1 Missing and 1 partial :warning:
cluster/loadbalance/iwrr/loadbalance.go 83.33% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

justxuewei commented 7 months ago

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

NX-Official commented 7 months ago

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

justxuewei commented 7 months ago

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.

sonarcloud[bot] commented 7 months ago

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