| Crates.io | atomic_token_bucket |
| lib.rs | atomic_token_bucket |
| version | 0.1.0 |
| created_at | 2025-10-26 21:00:45.502775+00 |
| updated_at | 2025-10-26 21:00:45.502775+00 |
| description | Lock-free Token Bucket algorithm implemented using atomics |
| homepage | https://github.com/alexpyattaev/atomic_token_bucket |
| repository | https://github.com/alexpyattaev/atomic_token_bucket |
| max_upload_size | |
| id | 1901867 |
| size | 50,796 |
A basic rate limiting / traffic shaping element. Validated using shuttle.
The basic primitive is TokenBucket which provides ability to limit
rate of certain events, while allowing bursts through.
More advanced KeyedRateLimiter allows to rate-limit multiple keyed
items, such as connections.
cargo bench
cargo test -F shuttle-test shuttle_test_token_bucket_race