| Crates.io | volga-rate-limiter |
| lib.rs | volga-rate-limiter |
| version | 0.8.1 |
| created_at | 2026-01-18 11:29:13.157369+00 |
| updated_at | 2026-01-25 10:54:08.691603+00 |
| description | Macros for Volga Web Framework |
| homepage | https://romanemreis.github.io/volga-docs |
| repository | https://github.com/RomanEmreis/volga |
| max_upload_size | |
| id | 2052228 |
| size | 34,918 |
A lightweight and efficient rate-limiting library for Rust.
This crate provides in-memory rate limiting algorithms designed for high-performance HTTP services and middleware.
💡 Status: Volga is currently in preview.
The public API may change while core abstractions are being finalized.
Rate limiting is used to control the number of requests that a client (or a group of clients) can perform within a given time window. Typical use cases include:
This crate focuses on per-node, in-memory rate limiting. It is intentionally simple and fast, and does not attempt to synchronize state across multiple processes or machines.
The following rate-limiting algorithms are provided:
[FixedWindowRateLimiter]
[SlidingWindowRateLimiter]
All rate limiters are built on top of a pluggable [TimeSource] abstraction.
This allows:
The default implementation, [SystemTimeSource], is based on
std::time::SystemTime.
The rate limiters are designed to be:
Internal state is optimized for frequent reads and updates under high contention.
The rate limiters are intended to be embedded into higher-level frameworks or middleware layers.