issues
search
leandromoreira
/
nginx-lua-redis-rate-measuring
A lua library to provide distributed rate measurement using nginx + redis, you can use it to do a throttling system within many nodes.
BSD 3-Clause "New" or "Revised" License
150
stars
16
forks
source link
Add unit tests
#2
Closed
leandromoreira
closed
5 years ago
leandromoreira
commented
5 years ago
[x] rate
[x] rate with no previous key (ngx.null)
[x] rate with previsou key
[x] logic for error handling (when redis commit pipeline doesn't work)
[x] logic for current counter (
local current_counter = tonumber(resp[2]) - 1
)
[x] logic for expire drift
[x] logic for past minute
local current_counter = tonumber(resp[2]) - 1
)