alisaifee / limits

Rate limiting using various strategies and storage backends such as redis & memcached
https://limits.readthedocs.org
MIT License
423 stars 58 forks source link

Shared ratelimit across multiple instances #159

Closed devamin closed 1 year ago

devamin commented 1 year ago

I am using https://github.com/laurents/slowapi which uses limits, I would like to know how to enforce ratelimit across instances, I found out that Redis keys are different for same request called from different instances which breaks the sharing.

alisaifee commented 1 year ago

Hi @devamin - the actual key used for the request will be coming from slowapi. limits itself will just take what gets passed in as identifiers here and concatenate them with the rate limit representation.

devamin commented 1 year ago

Thanks @alisaifee I will close this one