Rate limiter for argo.
Rate limiting for argo.
$ npm install argo-rate-limiter
var argo = ;var limit = ;// Allow 1 request every 5 seconds.// Allow bursts of 2 requests every 5 seconds.// In a burst, delay the excess request by 1 second.var options =capacity: 1duration: 5000 // msburst: 2delay: 1000 //ms;;
The number of requests allowed.
The maximum time allowed to consume the requests at capacity (in milliseconds).
The number of requests allowed in a burst scenario. Optional.
A delay applied to excess requests in a burst (in milliseconds). Optional.