https://github.com/evolution-gaming/throttler
Request throttler
https://github.com/evolution-gaming/throttler
request-throttler
Last synced: about 1 year ago
JSON representation
Request throttler
- Host: GitHub
- URL: https://github.com/evolution-gaming/throttler
- Owner: evolution-gaming
- License: other
- Created: 2017-07-03T12:57:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-08-17T14:00:14.000Z (almost 2 years ago)
- Last Synced: 2025-04-23T00:15:55.543Z (about 1 year ago)
- Topics: request-throttler
- Language: Scala
- Homepage:
- Size: 91.8 KB
- Stars: 6
- Watchers: 9
- Forks: 2
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# throttler
[](https://github.com/evolution-gaming/throttler/actions?query=workflow%3ACI)
[](https://coveralls.io/github/evolution-gaming/throttler?branch=master)
[](https://www.codacy.com/app/evolution-gaming/throttler?utm_source=github.com&utm_medium=referral&utm_content=evolution-gaming/throttler&utm_campaign=Badge_Grade)
[](https://evolution.jfrog.io/artifactory/api/search/latestVersion?g=com.evolutiongaming&a=throttler_2.13&repos=public)
[](https://opensource.org/licenses/Apache-2.0)
### RequestThrottler
RequestThrottler allows to limit the maximum number of requests / messages which can be processed within a specific time period for a specific user / resource, etc.
### TokenBucket
TokenBucket is a request throttling implementation for limiting requests rate for a single resource, see Token Bucket on Wikipedia.
### FixedIntervalRefillStrategy
FixedIntervalRefillStrategy is a token bucket refill strategy that will provide N tokens for a token bucket to consume every T milliseconds.
## Setup
```scala
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
libraryDependencies += "com.evolutiongaming" %% "throttler" % "2.0.1"
```