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

Global rate limiting for all, multiple routes instead of every route #1229

Open
neetra opened this issue May 11, 2020 · 8 comments
Open

Global rate limiting for all, multiple routes instead of every route #1229

neetra opened this issue May 11, 2020 · 8 comments
Labels
Configuration Ocelot feature: Configuration feature A new feature good first issue Should be pretty easy to do help wanted Not actively being worked on. If you plan to contribute, please drop a note. high High priority Rate Limiting Ocelot feature: Rate Limiting
Milestone

Comments

@neetra
Copy link

neetra commented May 11, 2020

Expected Behavior / New Feature

Add rate limit options for all requests in common

{
  "Routes": [],
  "RateLimitOptions": [
    {
      "RouteKeys": [ "posts", "users" ],
      "ClientWhitelist": [],
      "EnableRateLimiting": true,
      "Period": "10s",
      "PeriodTimespan": 3,
      "Limit": 1     
    }
  ]
}

Actual Behavior / Motivation for New Feature

We add rate-limiting options for every route :
For e.g:

{
  "DownstreamPathTemplate": "/users",
  "DownstreamScheme": "https",
  "DownstreamHostAndPorts": [
    {
      "Host": "jsonplaceholder.typicode.com",
      "Port": 443
    }
  ],
  "UpstreamPathTemplate": "/users",
  "UpstreamHttpMethod": [ "Get" ],
  "RateLimitOptions": {
    "ClientWhitelist": [],
    "EnableRateLimiting": true,
    "Period": "10s",
    "PeriodTimespan": 3,
    "Limit": 1
  }
}
@raman-m raman-m added Rate Limiting Ocelot feature: Rate Limiting feature A new feature help wanted Not actively being worked on. If you plan to contribute, please drop a note. good first issue Should be pretty easy to do labels Jan 11, 2024
@ZainHaiderArif
Copy link

Any progress on this issue please let me know i am kind of waiting to apply ratelimiting time globally.

@raman-m
Copy link
Member

raman-m commented Feb 23, 2024

@ZainHaiderArif
It is better to contribute, but not to wait ☝️

Our team (me, @RaynaldM, @ggnaegi) capacity is low and we work on more important issues (performance, a brand new features). But I hope we will work on this feature soon.

And for now, global Rate Limiting feature is available for Dynamic Routing 👉

@raman-m raman-m changed the title Add ratelimiting option to all/multiple re routes instead of every re route Add rate limiting option to all/multiple routes instead of every route Feb 23, 2024
@raman-m raman-m changed the title Add rate limiting option to all/multiple routes instead of every route Global rate limiting option for all/multiple routes instead of every route Feb 23, 2024
@raman-m raman-m changed the title Global rate limiting option for all/multiple routes instead of every route Global rate limiting for all, multiple routes instead of every route Feb 23, 2024
@raman-m
Copy link
Member

raman-m commented Feb 23, 2024

@neetra Hi Netra!
Are you with Ocelot nowadays?

@raman-m
Copy link
Member

raman-m commented Jun 15, 2024

Dear @neetra,
Did you read this 👉

@raman-m raman-m closed this as completed Jun 15, 2024
@raman-m
Copy link
Member

raman-m commented Oct 4, 2024

Reopening is due to significant interest from the community...

@raman-m raman-m reopened this Oct 4, 2024
@raman-m raman-m added Configuration Ocelot feature: Configuration high High priority labels Oct 4, 2024
@raman-m raman-m added this to the November'24 milestone Oct 4, 2024
@orkunseyman
Copy link

Hi.
is issue still open to contribute?
Is the expected feature to make the rate limit definitions in the global configuration by grouping the routes?

@raman-m
Copy link
Member

raman-m commented Dec 27, 2024

@orkunseyman Hello, Orkun!

is issue still open to contribute?

Yes, it is! Currently, there are no open pull requests linked to this issue.
We only have PR #2188, which is related to the Rate Limiting feature.

Is the expected feature to make the rate limit definitions in the global configuration by grouping the routes?

It depends on contribution and its design... However, the requirements of this issue do request some global options to be reused in every route. I believe the easiest solution is to assign global options to all routes exclusively, but implementing some form of grouping should not be difficult.

Are you planning to contribute? When?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Configuration Ocelot feature: Configuration feature A new feature good first issue Should be pretty easy to do help wanted Not actively being worked on. If you plan to contribute, please drop a note. high High priority Rate Limiting Ocelot feature: Rate Limiting
Projects
None yet
Development

No branches or pull requests

4 participants