unkey
unkey copied to clipboard
Improve ratelimit accuracy for stress test situations
We need to improve the accuracy of our distributed rate limiting system, as it currently fails under high node and RPS scenarios, exceeding the 20% tolerance threshold when running make test-stress
To resolve this, we should either increase the frequency of how often we read from the Redis counter or use a better method to sync between nodes to ensure they maintain more accurate limits.
Maybe we can use redis streams / pubsub to sync changes between nodes.