Redis + Lua Java实现限流

limit.lua文件内容以下: local key = KEYS[1] --限流KEY(一秒一个) local limit = tonumber(ARGV[1]) --限流大小 local current = tonumber(redis.call('get', key) or "0") if current + 1 > limit then --若是超出限流大小 return 0 el
相关文章
相关标签/搜索