Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiRatelimits should do a 2PC #1995

Open
3 tasks done
chronark opened this issue Jul 30, 2024 · 1 comment
Open
3 tasks done

MultiRatelimits should do a 2PC #1995

chronark opened this issue Jul 30, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@chronark
Copy link
Collaborator

Preliminary Checks

Reproduction / Replay Link (Optional)

No response

Issue Summary

When using multiple ratelimits, we check all limits serially and reject if one of them is exceeded. However this means previously checked limits are incremented regardless of subsequent checks and could be incremented falsely if we end up rejecting the request later.

Steps to Reproduce

  1. Use an identity with mulitple limits
  2. set one limit high and one low
  3. trigger the lower limit
  4. observe how the upper limit's counter still increments

Expected behavior

Counters should only be incremented if none of the limits are exceeded

Other information

No response

Screenshots

No response

Version info

- OS:
- Node:
- npm:
@chronark chronark added Bug Something isn't working Needs Approval Needs approval from Unkey labels Jul 30, 2024
Copy link

linear bot commented Jul 30, 2024

@chronark chronark removed the Needs Approval Needs approval from Unkey label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant