DR/Resilience when using Distributed Cache
I'm using Redis as the distributed store for rate limiting, but I'd like to know if there is anything in AspNetCoreRateLimit, or any plans to add anything to enable some kind of resilience.
At the moment it appears that should Redis be unreachable (for whatever reason) then my Web App is offline.
It would be really nice if there could be the ability to fall back gracefully - either to Memory Rate limiting, or just No Rate limiting at all.
Thoughts:
- Configurable
- Perhaps a static memory level switch that is set when a Redis exception occurs, which turn the Web App Rate Limit OFF for a period of time, or reverts to Memory Rate limiting
- Ability to specify a fallback Redis connection string (I guess this really comes under the Microsoft.Extensions.Caching.Redis rather than AspNetCoreRateLimit)
Try to use services.AddDistributedRedisCache
https://github.com/stefanprodan/AspNetCoreRateLimit/issues/27
@RouR Yes, I am already using that. If you see in #27, it was actually me who answered the question :)
@oatsoda I am wondering about the same issue. Did you resolved your issue? I thought about implementing custom rateLimitStore, something similar to the Solution2 mentioned here: https://github.com/stefanprodan/AspNetCoreRateLimit/wiki/Using-Redis-as-a-distributed-counter-store but it never gets called