openresty / lua-resty-limit-traffic

Lua library for limiting and controlling traffic in OpenResty/ngx_lua
821 stars 153 forks source link

How to share limit information among nodes? #37

Open leandromoreira opened 6 years ago

leandromoreira commented 6 years ago

I noticed that the lua-resty-limit-traffic uses the shared dict struct to store the data and I couldn't find any part of the documentation that deals with multiple nodes case, where a set of nodes should enforce a global traffic limit.

A stateful system is always something to be avoided but sometimes we just can't, is this library ready to use with a distributed in memory storage (like redis)? if it's not, can I try to do it and make a PR?

Globegitter commented 6 years ago

Was just looking into exactly the same thing and could only find: https://github.com/timebug/lua-resty-redis-ratelimit