How to understand least active road balance well?
- Dominant language
- Java
- Stars
- 41.6k
- Forks
- 26.4k
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 4
Description
I've sought all sites I could reach and read all docs related to this topic but still I am not getting it.
Sorry to post a question like this in issue part. But I have nowhere to go for the help.
I know from the official doc:
> The active number refers to the difference between the counts before and after the call. Select the machine with the minimum number of active calls or choose a random one among machines with the same active number, so that the slower machine can receives less requests.
It's not a problem to understand the last half part but as for the **active number definition**, I am really into confusion. And also there is a case to explain it officially as
> When A machine starts processing the request, the counter is incremented by 1. At this time, A is still processing. If the processing is completed, the counter is decremented by 1. B machine processes very quickly after receiving the request. Then the active numbers of A and B are 1,0 respectively.
To my understanding, A processes one (`before`) and still have one (`after`) while B one (`before`) and have zero (`after`) then the difference should be A: 0 and B: -1.
Weird result but it's based on the difinition.
What's the misunderstanding here? Really confusing here. Any help will be appreciated ;)
Contributor guide
Research direction
The issue only quotes the active-number documentation and describes confusion about the before/after wording; it names no files, tests, or entry points. Start by locating the official documentation for least-active load balancing, then clarify the definition and worked example so the counter calculation is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100