throttle-machines
High-performance rate limiting algorithms for Rust.
Algorithms
- GCRA (Generic Cell Rate Algorithm) - Smooth, precise per-request timing
- Token Bucket - Allows burst capacity with steady refill rate
- Fixed Window - Simple counter with TTL in current window
Usage
use gcra;
let result = check;
if result.allowed else
no_std Support
This crate is no_std compatible when the std feature is disabled:
[]
= { = "0.1", = false }
License
MIT