Atomic counters and rate limiting tools. Limit resource access at any scale.
ISC License
Bot releases are hidden (Show)
Published by animir 6 months ago
customIncrTtlLuaScript
option now. You can set custom Lua script as a string. It will be executed instead of built-in Lua script that is called on every upsert
. See this rejected when consume more than maximum points and multiply delay test for example. Thanks to @roggervalf👍
Published by animir 8 months ago
Add RateLimiterPrisma
. Read about it on Wiki. Prisma supports PostgreSQL, MySQL, SQLite, MongoDB and many other databases. Thank you @animir
Test environment and github actions got a number of improvements. Thank you @mroderick
BREAKING CHANGES: we dropped support for Node.js 14
and all previous versions.
Full Changelog: https://github.com/animir/node-rate-limiter-flexible/compare/v4.0.1...v5.0.0
Published by animir 9 months ago
RateLimiterMongo TypeError: Cannot read properties of null (reading 'value')
error was fixed. See https://github.com/animir/node-rate-limiter-flexible/issues/251 for reference.
Thanks to @o-ali
Published by animir 10 months ago
Thanks to @Daniel-97 rate-limiter-flexible
supports DynamoDB now!
Usage example can be found here.
BREAKING CHANGES: we dropped support for Node.js 12 and previous versions.
🐯
Published by animir 11 months ago
Published by animir 11 months ago
Published by animir about 1 year ago
schemaName
to RateLimiterPostgres limiter. Thanks to @paulsc54🍯
Published by animir about 1 year ago
I have really great news!
rate-limiter-flexible
supports ioredis
v4+ and redis
v4+ now.
We have been waiting for this moment for years.
Thanks to @roggervalf. And one big thank you from me personally
Since this is major release, there are
BREAKING CHANGES:
rate-limiter-flexible
works with ioredis
package of any version (tested versions 2, 3, 4 and 5) by default now. If you want it to work with the latest redis
package, you should set useRedisPackage flag. If you use redis
of version 3 or lower, you should stick to rate-limiter-flexible
version 2.inmemory
prefix are removed. You can use inMemoryBlockOnConsumed andredis
option for RateLimiterRedis
was removed. (Most likely you never heard about it, since it was deprecated years ago). You should use storeClient
option instead.Published by animir almost 2 years ago
Thank you @dmozgovoi for the quick improvement.
Published by animir almost 2 years ago
In some cases especially with insuranceLimiter set it is important to reject requests quickly based on Redis client status being not ready
. Thanks @dmozgovoi
Published by animir about 2 years ago
Thank you @svsool
Published by animir about 2 years ago
getTokensRemaining
with RateLimiterPostgres fixed. https://github.com/animir/node-rate-limiter-flexible/issues/125
clearExpiredByTimeout
is added to TS types for MySQL and Postgres limiters. https://github.com/animir/node-rate-limiter-flexible/issues/156
browser
package.json settings to allow bundling. https://github.com/animir/node-rate-limiter-flexible/commit/6ce34b394a2b82e36ab959eb884e475b5dad5fcc Thank you @achingbrainnodejs.util.inspect.custom
for Symbol flexibility. https://github.com/animir/node-rate-limiter-flexible/commit/2c8bedb973c3931a068ba23b5207763ecc26f988 Thank you @shlavikinmemoryBlockOnConsumed
and inmemoryBlockDuration
options are renamed to inMemoryBlockOnConsumed
and inMemoryBlockDuration
. Old options are still supported, but deprecated and will be removed in v3 major release. https://github.com/animir/node-rate-limiter-flexible/issues/106
Published by animir almost 3 years ago
mongoose
client. Thank you @adrianvlupuget
method. It incorrectly processed undefined
result from a store. Thank you @animir.editorconfig
added. Thank you @vinibeloniRateLimiterQueueError
added. Thank you @adilhafeezdeleteInMemoryBlockedAll
method is added. Thank you @animirPublished by animir about 3 years ago
replaceOne
with findOneAndUpdate
to fix a bug related to absent ops
attribute in MongoDB client v4+. Thank you @vdiezdelete
method on any store limiter deletes inMemoryBlocked key if it is there. Thank you @evan361425deleteInMemoryBlockedAll
method added to clean up all blocked keys at once. Thank you @evan361425 again :-)Published by animir over 3 years ago
Published by animir almost 4 years ago
Published by animir about 4 years ago
Published by animir over 4 years ago
Every time consume
method executed, it returns msBeforeNext
milliseconds. This can be used to block key in memory for exact msBeforeNext
milliseconds until points are reset on store. Set inmemoryBlockOnConsumed
option and omit inmemoryBlockDuration
for this feature.
Published by animir over 4 years ago
Allow traffic bursts with BurstyRateLimiter
Published by animir over 4 years ago
Changes
BREAKING CHANGES:
isWhite
and isBlack
getters/setters and options support removed from RLWrapperBlackAndWhite
. isWhiteListed
and isBlackListed
options should be used instead.IRateLimiterResOptions
interface type removed from lib/index.d.ts. IRateLimiterRes
should be used.