Comments (3)
yes, the third parameter is used to set the maximum number of tokens
tokenBucket(
/**
* How many tokens are refilled per `interval`
*
* An interval of `10s` and refillRate of 5 will cause a new token to be added every 2 seconds.
*/
refillRate: number,
/**
* The interval for the `refillRate`
*/
interval: Duration,
/**
* Maximum number of tokens.
* A newly created bucket starts with this many tokens.
* Useful to allow higher burst limits.
*/
maxTokens: number,
)
from ratelimit.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
from ratelimit.
This issue was closed because it has been stalled for 30 days with no activity.
from ratelimit.
Related Issues (20)
- Documentation is not found. HOT 1
- Self-hosted redis? HOT 4
- Analytics dont work when using prefix HOT 3
- How to use multiple ratelimiters? HOT 8
- slidingWindow doesn't work with tokens: 1 HOT 2
- QStash integration HOT 6
- Unable to view analytics on rate limit dashboard HOT 8
- Can you export RateLimitResponse please? HOT 3
- Is there a way to fetch the remaining requests for a given key HOT 5
- Dynamic token cost on Ratelimit.tokenBucket algorithm HOT 3
- Ratelimit doesn't seem to return proper reset time HOT 4
- Ratelimit usage with ioredis HOT 4
- Question about rate limit HOT 1
- SlidingWindow dose not work properly in the latest release HOT 1
- Rate Limiter takes 5s to complete API call HOT 5
- blockUntilReady and cf workers HOT 7
- Limiting Concurrency HOT 9
- custom rates support HOT 21
- Upstash Ratelimit Error in GH Action HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ratelimit.