Issue description
{
"count": 4000,
"key": "server_addr",
"policy": "redis-cluster",
"redis_cluster_nodes": [],
"rejected_code": 500,
"time_window": 1
}
When the threshold not reached,a few requests are prevented by the limit-count plugin.
The founction incoming, ttl and incrby opreations are not atomic.
Maybe can use eval() to ensure it.
Environment
- apisix version : 2.0
- OS (cmd:
uname -a): Linux 2020 x86_64 x86_64 x86_64 GNU/Linux
- OpenResty / Nginx version (cmd:
nginx -V or openresty -V): openresty/1.19.3.1
Minimal test code / Steps to reproduce the issue
压测即可复现
Issue description
{
"count": 4000,
"key": "server_addr",
"policy": "redis-cluster",
"redis_cluster_nodes": [],
"rejected_code": 500,
"time_window": 1
}
When the threshold not reached,a few requests are prevented by the limit-count plugin.
The founction incoming, ttl and incrby opreations are not atomic.
Maybe can use eval() to ensure it.
Environment
uname -a): Linux 2020 x86_64 x86_64 x86_64 GNU/Linuxnginx -Voropenresty -V): openresty/1.19.3.1Minimal test code / Steps to reproduce the issue
压测即可复现