You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/08/27 02:58:01 UTC
[GitHub] hupuxiaojun commented on issue #2345: dubbo的TPS限流模块在运行时系统时间发生变化的情况下限流不能正常工作
hupuxiaojun commented on issue #2345: dubbo的TPS限流模块在运行时系统时间发生变化的情况下限流不能正常工作
URL: https://github.com/apache/incubator-dubbo/issues/2345#issuecomment-416100556
@EdgarTeng 这种方式好像也是有问题的,限流的时间窗口是一个滑动(sliding window)窗口(最近60秒),不是一个翻滚(Tumbling window)窗口(0-60,60-120)。
假设interval=60,rate=5000
你这个线程是固定周期重置,极端情况下,59秒的时候,进来4999个请求,都放行了,然后第60秒,你重置了rate,然后第61秒又进来4999个请求,这时候由于已经重置,所以这4999个请求仍然可以通行。
结果就是你的服务在3秒内就收到了4999*2个请求,远大于你设置的1分钟5000的rate。
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org