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

[Rate limiting] Configure Rate limit policies in Choreo Connect components #71

Closed
1 of 6 tasks
renuka-fernando opened this issue Oct 30, 2022 · 3 comments
Closed
1 of 6 tasks

Comments

@renuka-fernando
Copy link

renuka-fernando commented Oct 30, 2022

Description

Rate limit policies are configured in the Control Plane or defined using Ratelimit CRD with API, HTTP Route, Application and Subscription CRDs. Once Ratelimits are in an internal Data Structure (Ratelimits got from CP or CRDs) to the Agent, the Agent should configure Enforcer, Router, and Ratelimit service with Ratelimit policies.

@renuka-fernando
Copy link
Author

renuka-fernando commented Oct 30, 2022

@renuka-fernando
Copy link
Author

For inline rate limits (Ratelimits are defined by the API creator by just typing the number of requests in an input box and selecting the unit time from a selection with conditional rate limits) it is able to use the same name for the same limits (to reuse the same policy, otherwise the rate limit config will be larger).

For example 10 req/min: "$_10_per_min"

But there could be cases something like the following.
The same 10 per min policy with different conditional policies.
Eg:

  • Policy1: 10 per min, c1 - IP Range(1,2)
  • Policy2: 10 per min, c1 - IP Range (2,3)).

Append UUIDs of conditions to the name ("$_10_per_min_UUID1", "$_10_per_min_UUID2", "$_10_per_min_default"). This has to be decided.

@renuka-fernando
Copy link
Author

Rate limit policies including conditional policies (this should be clearly identified): https://docs.google.com/document/d/1ttOTjbNPWUM9Em4vQAK1KW5wdcVXK6Z51jBgI2Rr5vI/edit#heading=h.emcc7kx7gf6i

  • Header equals a value
  • Header matches for given regex pattern
  • IP in "X-Forwarded-For" header equals the defined IP
  • IP in "X-Forwarded-For" header is within the defined IP range
  • Time the request is made is within the given time range (Cron format with duration - or duration) (eg: Peak/Off Peak)

@renuka-fernando renuka-fernando mentioned this issue Oct 30, 2022
13 tasks
@renuka-fernando renuka-fernando changed the title Configure Rate limit policies in Choreo Connect components [Rate limiting] Configure Rate limit policies in Choreo Connect components Oct 31, 2022
@tharindu1st tharindu1st added this to the 0.0.1-m2 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants