mholt / caddy-ratelimit

HTTP rate limiting module for Caddy 2
Apache License 2.0
254 stars 17 forks source link

Different storage for rate_limit #39

Closed odarriba closed 9 months ago

odarriba commented 9 months ago

Hello,

Is it possible to store rate_limit related information in a different storage than the default Caddy's one?

If you for example use NFS to synchronize TLS certificates and so on, it would be nice to be able to set another storage (like Redis?) for rate_limit, as the delay in NFS reads/writes can affect the performance of the rate limiter.

Thanks in advance

mohammed90 commented 9 months ago

Is it possible to store rate_limit related information in a different storage than the default Caddy's one?

Yes. See in the JSON config, the handler configuration can take storage as one of the parameters.

The same thing for the Caddyfile config.