node-rate-limiter-flexible
node-rate-limiter-flexible copied to clipboard
Created RedisRateLimiterNonAtomic
Issue : https://github.com/animir/node-rate-limiter-flexible/issues/222
- Tested with npm run eslint
Introduces non atomic redis rate limiter
it is designed to be non-atomic, meaning it does not guarantee that limit checking and update operations are performed atomically. Advantages :
- It will be faster than RateLimiterRedis, as it does not wait till the Lua script is executed.
- Using lua scripts means that all operations are write operations that would go to a single Redis master write node, making read nodes useless. This implementation allows for read operations to be distributed across multiple Redis nodes, hence making it more scalable and faster. Disadvantages :
- This will be useful in scenarios where you want to allow concurrency and are okay with potential over-consumption of points till the read values are synced by redis.
@shameersheik Hey, are you going to continue implementation of the non atomic limiter?
@shameersheik Hey, are you going to continue implementation of the non atomic limiter?
Yeah, will let you know if I have any new updates.