1 stable release
1.0.0 | Jun 29, 2020 |
---|
#13 in #token-bucket
340 stars & 11 watchers
10KB
120 lines
rustcommon-ratelimiter
Token bucket ratelimiting with various refill strategies
Overview
This crate provides token bucket ratelimiting implementations. The typical use-case would be to control the rate of requests or other actions.
This particular implementation allows for setting a refill strategy for the token bucket. This allows for creating noise in the interval between additions of tokens into the bucket. By doing this, we can create workloads that are bursty and can more closely mirror production workload characteristics.
Getting Started
Building
rustcommon is built with the standard Rust toolchain which can be installed and managed via rustup or by following the directions on the Rust website.
View library documentation
cargo doc --open
Support
Create a new issue on GitHub.
Contributing
We feel that a welcoming community is important and we ask that you follow Twitter's Open Source Code of Conduct in all interactions with the community.
Authors
- Brian Martin bmartin@twitter.com
A full list of contributors can be found on GitHub.
Follow @TwitterOSS on Twitter for updates.
License
Copyright 2019-2020 Twitter, Inc.
Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0
Security Issues?
Please report sensitive security issues via Twitter's bug-bounty program (https://hackerone.com/twitter) rather than GitHub.
Dependencies
~1MB
~21K SLoC