GLGGAG commented on issue #15762:
URL: https://github.com/apache/dubbo/issues/15762#issuecomment-3551500958

   You’re right — in my previous table I deliberately exaggerated the numbers 
to make the difference more visible. In a real production configuration, the 
totalWeight during the warm-up phase will not be that large, and it will grow 
gradually as warm-up progresses, so the current of the old nodes probably won’t 
go that far into large negative values as in my example.
   
   What I’m really trying to confirm is whether the following trend is valid, 
and if so, where my understanding diverges from the actual Dubbo implementation:
        •       There are 2 old nodes, with a fixed weight of 100;
        •       There are several new nodes whose weights increase gradually 
from 0 to 100 during warm-up;
        •       Whenever the weight of a new node changes, its current is reset 
to 0;
        •       And the number of new nodes is significantly larger than the 
number of old nodes, e.g. 3× more (for example, 2 old nodes + 6 new nodes).
   
   Under these assumptions, my understanding is: once the new nodes’ weights 
reach a certain threshold (say, 30+ or higher), the combination of “more new 
nodes” + “continuously increasing weights” will cause requests to be much more 
likely to hit the new nodes, and the old nodes will be selected less 
frequently. When the number of new nodes is much larger than the number of old 
nodes, this bias becomes even more obvious, and in the mid/late warm-up stage 
the old nodes may stay in a state of being “rarely selected” for a long period.
   
   In addition, if during warm-up the weight changed without resetting the 
corresponding node’s current to 0, the overall behavior would intuitively look 
more in line with expectations: new nodes would gradually take traffic, but old 
nodes wouldn’t “disappear” for a long time. However, because during warm-up the 
current of new nodes is repeatedly reset to 0 whenever the weight changes, this 
effectively wipes out the negative part that would have been accumulated due to 
subtracting totalWeight. As a result, at the same weight level, new nodes 
become more competitive than they would be without the reset. In other words, 
this “reset current to 0” behavior is effectively accelerating the increase of 
the selection probability of new nodes.
   
   Could you help confirm whether this overall trend and analysis matches the 
actual behavior of Dubbo’s smooth weighted round-robin + warm-up 
implementation, or if there is any detail in my understanding that is 
inconsistent with the code?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to