Quota renew not working as expected

I have tyk running in docker. Configured API, policy and key. Have limit on policy quota max set to 10, quota renew rate set to 600 sec. Very first quota works perfectly but the same not case with next period after the quota is renewed. I don’t see quota exceed message consistently. some time it takes 2 cycles some times 4 cycles to fire quota exceed message. Please share any though and suggestion.

The quota will count down from 10, if it reaches 0, requests ill be stopped. If the renewal period is passed, then the quota will be renewed to 10. So every 600 seconds, the user will get an allocation of 10 requests.

1 Like

Thank you for your kind reply. Even my expectation was the same, but before 600 sec if i hit 10 times my requests are not being blocked, instead quota is re allocated. All these limitations that we are talking about works perfectly for the first time but on subsequent cycles it is behaving differently. Not sure why, below is what I have this on my policy. Is there any extra configuration that I have to look at? Since issue is happening on my local installation which uses dashboard to configure and kub +docker install on aws which uses config files could it be a possible bug?

“rate”: 2,
“per”: 5,
“quota_max”: 10,
“quota_remaining”: 10,
“quota_renewal_rate”: 600,

The only way it would not work is if your gateways are not speaking to the same redis DB.