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

Multiple descriptor with AND operator #390

Closed
rvgud opened this issue Jan 9, 2023 · 3 comments
Closed

Multiple descriptor with AND operator #390

rvgud opened this issue Jan 9, 2023 · 3 comments
Labels

Comments

@rvgud
Copy link

rvgud commented Jan 9, 2023

Our requirement is to put a rate limit as below:

  1. Allow 600 req/day
  2. Above 600 req should be across the day. Meaning maybe 60 req per minute.

I have tried below descriptor definition but it seems its is putting multiple rules with OR operator.
domain: test-domain descriptors: - key: USERID value: "TEMP_USER" rate_limit: requests_per_unit: 600 unit: day - key: USERID value: "TEMP_USER" rate_limit: requests_per_unit: 60 unit: hour

With above config, it is allowing all the day limit which is 600 req, in first hour of the day as well since it matches the first rules and ignores the second rules.

Idea here is to not allow customers to send all the request of daily limit in a short period of time and over-flood the server. Instead allow a small portion of their daily limit per hour.

I couldn't achieve it using multiple combinations of descriptors, so wondering if it even supported.

@m-rcl
Copy link
Contributor

m-rcl commented Jan 9, 2023

I think your requirement is the same one as #190

@github-actions
Copy link

github-actions bot commented Feb 8, 2023

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 8, 2023
@github-actions
Copy link

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted" or "no stalebot". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants