Hello, everyone
I want to add a distributed token bucket limit plugin based on Redis. Although most of the existing current limit plugins have already been used in most scenarios, there are still some specific scenarios that need to implement distributed speed limiting. Token bucket-based speed limit can effectively correct traffic spikes caused by fixed-time window current limit and make limiting smoothly. And we hope that the limit algorithm can limit the flow based on your own custom keywords. These keywords can be the header used to mark the source app, or it can be a query parameter. How to do it? We package the token bucket algorithm into a Lua script, use the Redis “script load” command to load the token bucket algorithm into the Redis Server, and then perform the current limit through “evalsha” command. [cid:image001.png@01D5C47D.B3ADB700] Can anyone give some advice? Is this needed for APISIX?