lua-resty-limit-traffic icon indicating copy to clipboard operation
lua-resty-limit-traffic copied to clipboard

limit.req with ngx.now

Open WANMAX opened this issue 4 years ago • 1 comments

My project is online today, the limit config is 1000/s. But the truth is, 300 requests had trigered the req limit(I understand the bucket algorithm). I wonder if this has something to do with the cache of ngx.now.

WANMAX avatar Sep 09 '19 06:09 WANMAX

The burst config is 300. I know the diff between the rate and the count of requests, and it is possible that these requests all occur in the 100ms. But there are thirty machines, and the situation lasted about 10 min in every machine every sec. Does it feel right?

WANMAX avatar Sep 09 '19 06:09 WANMAX