Optimized sliding-window#132
Conversation
|
@SomajitDey is attempting to deploy a commit to the Upstash Team on Vercel. A member of the Team first needs to authorize it. |
|
@CahidArda Might I request a review of this PR 🙏 If the proposed implementation is unclear from the comments in the script, please let me know. To understand the mathematical equivalence between the proposed and the existing implementations, the following notes might help.
|
|
Hi @SomajitDey, Thanks for the PR, I will review and get back to you soon |
Hello @CahidArda, any update on this PR? |
Implemented the sliding-window ratelimiter in a more efficient way, requiring less number of commands. The new command count matrix is:
So, for most cases (i.e. Intermediate state), the proposed implementation requires half (2/4) of the number of commands required by the existing implementation.
Other comparisons