rate-limiter-flexible
Advanced tools
Comparing version 0.15.1 to 0.15.2
{ | ||
"name": "rate-limiter-flexible", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"description": "Flexible API rate limiter backed by Redis for distributed node.js applications", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -22,3 +22,4 @@ [![Build Status](https://travis-ci.org/animir/node-rate-limiter-flexible.png)](https://travis-ci.org/animir/node-rate-limiter-flexible) | ||
Advantages: | ||
* in-memory block strategy against really powerful DDoS attacks (like 100k requests per sec) [Read about it and benchmarking here](https://github.com/animir/node-rate-limiter-flexible/blob/master/BLOCK_STRATEGY.md) | ||
* in-memory Block Strategy against really powerful DDoS attacks (like 100k requests per sec) [Read about it and benchmarking here](https://github.com/animir/node-rate-limiter-flexible/blob/master/BLOCK_STRATEGY.md) | ||
* Insurance Strategy as emergency solution if database / store is down [Read about Insurance Strategy here](https://github.com/animir/node-rate-limiter-flexible/blob/master/INSURANCE_STRATEGY.md) | ||
* backed on native Promises | ||
@@ -30,3 +31,2 @@ * works in Cluster without additional software [See RateLimiterCluster benchmark and detailed description here](https://github.com/animir/node-rate-limiter-flexible/blob/master/CLUSTER.md) | ||
* no prod dependencies | ||
* database errors don't result to broken app if `insuranceLimiter` set up | ||
* useful `get`, `block`, `penalty` and `reward` methods | ||
@@ -242,10 +242,2 @@ | ||
inmemoryBlockDuration: 30, // block for 30 seconds in current process memory | ||
insuranceLimiter: new RateLimiterMemory( | ||
// It will be used only on database error as insurance | ||
// Can be any implemented limiter like RateLimiterMemory or RateLimiterRedis extended from RateLimiterAbstract | ||
{ | ||
points: 1, // 1 is fair if you have 5 workers and 1 cluster | ||
duration: 5, | ||
execEvenly: false, | ||
}) | ||
}; | ||
@@ -252,0 +244,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
91484
27
522