24kpure opened a new pull request #68:
URL: https://github.com/apache/dubbo-spi-extensions/pull/68


   ## What is the purpose of the change
   I am disappointment with shortestResponseLoadBalance,though  it  is better 
than others in latency spike. However, it’s slow for it  depends on average.I 
am looking forwad to a sensitive loadbance.
   
   PeakEwmaLoadBalance is designed to converge quickly when encountering slow 
endpoints.
   It is quick to react to latency spikes recovering only cautiously.Peak EWMA 
takes history into account,so that slow behavior is penalized relative to the 
supplied `decayTime`.
   
   Inspiration drawn 
from:[finagle](https://github.com/twitter/finagle/blob/1bc837c4feafc0096e43c0e98516a8e1c50c4421/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/PeakEwma.scala)
   
   ## Brief changelog
   -  calculate cost by exponential moving averages
   -  add decayTime
   -  ignore invoker‘s weight
   
   ## Q&A
   Q: Why decayTime default value is 10_000 ?
   A: It's hard to find an appropriate default value, so refer to apisix first.
   
   Q: Why does peakEwmaLoadBalance ignore weight?
   A: PeakEwmaLoadBalance pays more attention to rt,as for weight,equal costs 
only appear in very few scenes. What's
   more,the node weights are equal  in most case, for instance, cloud native 
scene.Though dubbo works in different weight scene, active will help in traffic 
distribution.
   
   Q: Why does it add lock to `observe`?
   A: For calculating cost and updating some rt related parameters.
   
   ## note
   We will have a try first and  feed back to the community in time.
   
   ## Reference
   
[finagle](https://github.com/twitter/finagle/blob/1bc837c4feafc0096e43c0e98516a8e1c50c4421/finagle-core/src/main/scala/com/twitter/finagle/loadbalancer/PeakEwma.scala)
   
[apisix](https://github.com/apache/apisix/blob/131998df4f44720b7ddf0424f4d381efb689d4ce/apisix/balancer/ewma.lua
   )
   
[paper](http://www.eckner.com/papers/Algorithms%20for%20Unevenly%20Spaced%20Time%20Series.pdf)
   
   
   
   
   
   
   
   


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