nic-6443 commented on issue #12592:
URL: https://github.com/apache/apisix/issues/12592#issuecomment-4676894393

   This is fixed on master now. Your diagnosis was right — the redis commit 
path in `limit-req/util.lua` used to do separate GET/GET/SET/SET calls, so 
under concurrent load multiple requests would read the same stale leaky-bucket 
state and all get admitted, which is why you saw ~3.6 req/s with `policy: 
redis` but a clean 1 req/s with `policy: local` (the local path was always 
atomic inside a lock).
   
   The commit path now runs a single atomic Redis Lua script via EVAL on one 
hash key with a TTL, for both `redis` and `redis-cluster` policies — see #13467 
(commit 6e877eb44). A related fix for key eviction (#12911) already shipped in 
3.15.0, and the atomicity fix will be in the first release after 3.16.0. If you 
can build from master, it would be great to hear whether your parallel test now 
stays at the configured rate; otherwise I'd suggest closing this one.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to