#rate-limiting #actix-web #regex #actix

actix-rate-limiter

Simple yet powerful per-route rate-limiter for Actix with support for regex

2 releases

0.1.1 Jul 30, 2024
0.1.0 Jul 28, 2024

#524 in HTTP server

Download history 208/week @ 2024-07-25 61/week @ 2024-08-01 16/week @ 2024-08-08 7/week @ 2024-08-15

119 downloads per month

MIT license

20KB
307 lines

actix-rate-limiter

actix-rate-limiter is a simple yet powerful per-route rate limiter for Actix with support for regex.

Available backends

Right now, only in-memory storage is supported officially. But you can create your own backend using the BackendProvider trait. You can use MemoryBackendProvider as an example implementation.

We plan to add support for some other backends in the future, such as Redis. If you want to help with their development, please open a PR.

Examples

Check the examples folder of our repository to see the available code samples.

License

This library is licensed under MIT License.


lib.rs:

actix-rate-limiter is a simple yet powerful per-route rate limiter for Actix with support for regex.

Available backends

Right now, only in-memory storage is supported officially. But you can create your own backend using the BackendProvider trait. You can use MemoryBackendProvider as an example implementation.

We plan to add support for some other backends in the future, such as Redis. If you want to help with their development, please checkout our GitHub.

Examples

Check the examples folder of our repository to see the available code samples.

Dependencies

~18–29MB
~519K SLoC