Rate limit plugin problem


#1

I’m using jmeter to test the ratelimit plugin’s performance.But I found the result not my expectation。
I config 15rquest/s on plugin , and i use redis on plugin ,then simulated 20 concurrency.after 1 minute, the real result is 17request/s. i tested many times, each time the result is higher than the config. It makes me very confused, who can help me, thank you.


#2

This is a known behavior when using Redis as a data store; the current implementation is subject to race conditions in high-concurrency traffic patterns. See https://github.com/Kong/kong/issues/3329 and https://github.com/Kong/kong/issues/2629 among others. If you have strong consistency needs, consider using the local policy which keeps data in memory.


#3

Could you please detail your latency for these requests ?
Is your 95th latency more like 1ms or 1000ms ?

Did you check this is not due to the fact that the rate limit use fixed time window ?
Does your minute start at ??:??:00