apache / apache/dubbo

[Feature] LeastActiveLoadBalance does not properly utilize weights.

Open
#14,406 4 comments 0 reactions 1 assignee Claimed by @howie-xu View on GitHub
component/need-triage type/need-triage
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Pre-check

- [X] I am sure that all the content I provide is in English.

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar feature requirement.

### Apache Dubbo Component

Java SDK (apache/dubbo)

### Descriptions

In LeastActiveLoadBalance, instances are first filtered by the minimum number of active connections. If there is more than one instance with the minimum number of active connections, a random selection is made based on weights. This design seems somewhat unreasonable, and the warmup feature doesn't have much effect (a batch of instances that are restarted or scaled up will still suddenly receive a large number of requests). Could we use the weights more effectively during the minimum connection filtering phase, for example, by using active * afterWarmup to determine the least active instance?

### Related issues

_No response_

### Are you willing to submit a pull request to fix on your own?

- [x] Yes I am willing to submit a pull request on my own!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.