Loading...
This site is best viewed in a modern browser with JavaScript enabled.
Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.
lua-resty-limit-conn源码解读
iihelpcc
lua-resty-limit-conn这个库 源码中 动态调整处理延迟时间 这块为什么要处以2啊 不直接用self.unit_delay = req_latency这样呢
moonbingbing
self.unit_delay 是在 new() 里面用 default_conn_delay 初始化的,这里除以 2, 就是取上次 delay 和这次的平均值。
在 2018年1月19日 上午11:21,cheng ye
<
iih...@gmail.com
>
写道:
lua-resty-limit-conn这个库 源码中
动态调整处理延迟时间 这块为什么要处以2啊
不直接用self.unit_delay = req_
latency这样呢
--