Currently, the ratelimit service uses the radix Redis client with a hard-coded ~10s timeout. When Redis is down or slow, this causes blocking calls, goroutine buildup, and high memory usage. The timeout isn’t configurable, which can lead to OOMs in failure scenarios.
Proposal:
- Expose Redis connection/read/write timeouts via environment variables (e.g. REDIS_TIMEOUT_MS or separate fields).
- Expose an ENV variable to optionally add a circuit breaker mode that temporarily skips Redis calls after repeated timeouts, retrying periodically.
This would allow operators to tune latency and prevent cascading failures during Redis outages.
Can I open a PR to add this configuration and optional circuit breaker behavior?