Node Rate Limiter Flexible Versions Save

Atomic counters and rate limiting tools. Limit resource access at any scale.

v2.3.12

1 year ago

Thank you @svsool

v2.3.11

1 year ago

v2.3.4

2 years ago
  • MongoDB version detection is fixed for mongoose client. Thank you @adrianvlupu
  • MongoDB version detection is fixed for 3.6.7+. Thank you @pavittarx
  • Internal fix of get method. It incorrectly processed undefined result from a store. Thank you @animir
  • .editorconfig added. Thank you @vinibeloni
  • TypeScript type for RateLimiterQueueError added. Thank you @adilhafeez
  • TypeScript type for deleteInMemoryBlockedAll method is added. Thank you @animir

v2.3.0

2 years ago
  • replace replaceOne with findOneAndUpdate to fix a bug related to absent ops attribute in MongoDB client v4+. Thank you @vdiez
  • delete method on any store limiter deletes inMemoryBlocked key if it is there. Thank you @evan361425
  • new deleteInMemoryBlockedAll method added to clean up all blocked keys at once. Thank you @evan361425 again :-)
  • @evan361425 also added tests to cover new lines 🥇

v2.2.3

2 years ago
  • Missing get/set Typescript types added and documentation improved. Thanks @rijkvanzanten
  • mongodb client v4 support. Thank you @backflip

v2.2.1

3 years ago

v2.1.10

3 years ago
  • RateLimiterQueue support of tokens removed by key. (single bucket for every key)
  • Add RateLimiterQueue missing methods types. Thank you @bmenant
  • RateLimiterPostgres fixed for [email protected] update. Thank you @matomesc
  • tableCreated option for MySQL and PostgreSQL to skip checks for limiter tables.
  • BurstyRateLimiter compatible with RateLimiterQueue now. Thanks a lot to @matomesc for a big help on this.
  • RateLimiterMemory limiter works in browser now. Thanks a bunch to @cha0s. Also, thank you for test scripts improvements.

v2.1.3

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.

v2.1.0

4 years ago

Allow traffic bursts with BurstyRateLimiter

v2.0.0

4 years ago

Changes

  • Redis uses Lua script for expiring atomic increments. It allowed to remove a hack, which made extra queries to Redis, when TTL is not set on key set.
  • RateLimiterCluster options type fixed.

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.