Redis Rate Limiting

I’m using redis policy for rate limiting in kong and was thinking of this scenario,

architecture- LB—| 3 kong nodes |------ redis

let’s say I have set config.minute=3 and since the code first fetches the key and then increments it, isn’t it possible for two requests to see same count when one fetches the key before another increments it.

If the above scenario is true, how likely it will happen in production env? and what are the some way around this?

If my understanding is wrong please help me understand this. Thank you.

© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ