openresty / lua-resty-limit-traffic

Lua library for limiting and controlling traffic in OpenResty/ngx_lua
819 stars 150 forks source link

Rate-Limit Per Minute #63

Open arabsoheyl opened 3 years ago

arabsoheyl commented 3 years ago

I want to use this module for rate-limiting incoming requests per minute. This module has rate-limiting per second. how can I limit incoming requests based on 3 requests per minute(With the possibility of sending 3 requests at the same time)?

manoaratefy commented 2 years ago

Hello,

I think you have to use resty.limit.count. Set something like this:

local limit_count = require "resty.limit.count"
limit_count.new("my_limit_count_store", 3, 60)