Crate actix_rate_limiter

Crate actix_rate_limiter 

Source
Expand description

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.

Modules§

backend
This module represents backends for rate-limiter with some general public tools for your own implementation.
limit
Representation and implementation of the bucket and its limitx.
limiter
Representation and implementation of a rate-limiter core logic.
middleware
Implementation of the rate-limiting middleware.
route
Route builder and route representation itself.

Type Aliases§

RequestId
General type for tne ID of the request. It consists of the requester’s identifier and the request’s path. Guaranteed format: {id}:{path}.