rate-limit-redis icon indicating copy to clipboard operation
rate-limit-redis copied to clipboard

Leaky bucket strategy

Open Zirafnik opened this issue 2 years ago • 3 comments

Description

I am crossposting this from express-rate-limit, since it is a Store improvement suggestion.

Original post: #https://github.com/express-rate-limit/express-rate-limit/issues/359#issue-1799456039

Why

.

Alternatives

.

Zirafnik avatar Jul 12 '23 10:07 Zirafnik

This would be a great feature.

PaulAtST avatar Aug 16 '23 03:08 PaulAtST

@nfriedly what do u think?

mt-ks avatar Nov 08 '25 23:11 mt-ks

I left some comments on the original post. Basically I think it's fine if somebody wants to do it in their own store, but I don't really think it's worth the trouble in the official ones for a couple of reasons:

  • Leaky bucket prevents some of the optimizations that we have.

  • It was impossible to represent with the older header standards, although it might actually be possible with the latest draft.

If we did do it officially, I think I would want to do a redesign of the whole project so that the strategy and store were independent of eachother, and every strategy could work with every store. But that seems like a ton of work, and probably not worth the effort.

nfriedly avatar Nov 09 '25 13:11 nfriedly