Open Bharat23 opened 6 months ago
I am happy to create a PR to gracefully handle this.
Welcome PR.
Returning 503 directly when unable to connect to redis would be a good approach.
Welcome PR.
Returning 503 directly when unable to connect to redis would be a good approach.
I was thinking "disable rate limiting if backend is down". The fact that redis is down may not mean that the underlying service is down. I think service should still respond back if it can, only the ratelimiting should be disabled. Thoughts?
This can lead to problems such as API theft.
PR for the requested enhancements https://github.com/abersheeran/asgi-ratelimit/pull/75
Description
When using Redis as a backend, the code doesn't handle any exceptions caused by the backend, i.e., Network/Connectivity related, which results in a 5xx
internal server error
.How to reproduce
Expected Behavior:
On backend exceptions, the endpoint should not fail and just let it do the standard processing and disregard rate-limiting.
Python version: 3.9 Library version: 0.10.0