dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

How to understand least active road balance well?

Open Hearen opened this issue 6 years ago • 0 comments

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 ;)

Hearen avatar Sep 10 '19 13:09 Hearen