Limiter storage mechanisms: Redis vs In-Memory
masterLimiter supports two primary storage drivers:
- Redis: Relies on Redis TTL (Time To Live) and increments the rate limit on each request. This is ideal for distributed systems where multiple application instances need to share the same rate limit state.
- In-Memory: Uses a local cache with a background goroutine to clear expired keys. This is faster and simpler but only works for a single application instance (local to that process).