Skip to content

mtorre4580/token-bucket

Repository files navigation

Token Bucket

Create a token bucket algorithm in Javascript

Why is useful?

Is useful when you have to throtle something, example in a rate limiter API

Description

A token bucket is a container that has a default capacity, tokens are put in the bucket at preset rates periodically. Once the bucket is full, no more tokens are added, the extra tokens will overflow

token bucket

Algorithms

  • Token bucket
  • Leaking bucket

Releases

No releases published

Packages

No packages published