lua-resty-limit-traffic
lua-resty-limit-traffic copied to clipboard
feature: new module resty.limit.rate
This PR have been discussed at https://github.com/openresty/lua-resty-limit-traffic/pull/26.
This module provides APIs to help the OpenResty/ngx_lua user programmers limit request rate using the "token bucket" method.
Small differences with existing modules, this module use resty.lock
to make sure shdict operations across multiple nginx worker process is atomic, but default disable.
Given that there are some features that apply to our own business environment, we maintain a repository independently, see https://github.com/upyun/lua-resty-limit-rate
@agentzh Thanks to the review code, I got a lot of valuable advice, I will continue to improve in the future if necessary :-)
Why hasn't merged this PR?
@deetchtoys Hello, I reopened this PR, over the years, this module has been used in some company production environments for a long time, if @agentzh @doujiang24 see fit to merge into limit-traffic, I will continue to improve this.