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

resty.limit.req vs resty.limit.count

Open chopper-poet opened this issue 5 years ago • 2 comments

what is different resty.limit.req with resty.limit.count? If i want to restrict qps,which one shoud i choose?

thks.

chopper-poet avatar Sep 17 '18 07:09 chopper-poet

you should choose resty.limit.req, it based on the leaky bucket algorithm. resty.limit.count is similar to quota or frequency control, it based on the fixed window algorithm. resty.limit.req is more accurate than resty.limit.count for qps control.

Xuhaomiao avatar Apr 05 '19 13:04 Xuhaomiao

thks

you should choose resty.limit.req, it based on the leaky bucket algorithm. resty.limit.count is similar to quota or frequency control, it based on the fixed window algorithm. resty.limit.req is more accurate than resty.limit.count for qps control.

chopper-poet avatar Apr 08 '19 05:04 chopper-poet