fastify / fastify-rate-limit

A low overhead rate limiter for your routes
MIT License
477 stars 66 forks source link

revert: handle ban in store #347

Closed gurgunday closed 8 months ago

gurgunday commented 8 months ago

Hey everyone,

The change that moved ban handling to the store-side in a non-breaking manner hasn't accomplished anything meaningful in terms of fixing the sync issue between multiple deployments when an in-memory counter is used, I basically misunderstood the problem

Naturally there will always be this issue with in-memory counters, and moving the ban calculation to the store just increased the network payload for Redis configurations, albeit a little bit

Now, I'm pretty sure not many people have custom stores that handle ban themselves, because the change is pretty new (a month old), but in any case, I will be targeting next to be sure