leaky-bucket-queue
An implementation of leaky bucket on top of rxjs
.
Simple rate limiting are usually good enough for most scenario but they might incur unnecessary stuttering when there is attempt to make multiple call to a server API. Leaky bucket provides a burstable solution, providing rate limit while allowing bursty traffic, making application more responsive.
Installation
npm i leaky-bucket-queue
Usage
Typescript
; ;queue.consume.subscribe;queue.enqueue'compter';...
JavaScript
; const queue = burstSize: 5 period: 100 ;queue;queue;...