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

Apply rate limiting globally #1915

Open
erick20 opened this issue Jan 10, 2024 · 7 comments
Open

Apply rate limiting globally #1915

erick20 opened this issue Jan 10, 2024 · 7 comments
Labels
Rate Limiting Ocelot feature: Rate Limiting
Milestone

Comments

@erick20
Copy link

erick20 commented Jan 10, 2024

this is my configuration that is not working globally

"GlobalConfiguration": {
    "BaseUrl": "https://localhost:5002",
    "RateLimitOptions": {
      "DisableRateLimitHeaders": true,
      "QuotaExceededMessage": "Exceed ",
      "HttpStatusCode": 400,
      "ClientWhitelist": [],
      "EnableRateLimiting": true,
      "Period": "10s",
      "PeriodTimespan": 3,
      "Limit": 1
    }
  }

when i'm adding this to a specific route it is working

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

is there any option to setup rate limiting globally that will affect to my all endpoints?

@raman-m
Copy link
Member

raman-m commented Jan 10, 2024

This is where the global load balancer and rate limit options apply.

@raman-m
Copy link
Member

raman-m commented Jan 10, 2024

Hi Erick!
Is it the question or feature request? 😉
Now you are able to use global Rate Limiting in case of Dynamic Routing only.
My complete answer is here

@raman-m raman-m added the Rate Limiting Ocelot feature: Rate Limiting label Jan 10, 2024
@raman-m
Copy link
Member

raman-m commented Jan 10, 2024

Do you have intention to contribute to develop this global feature?

@erick20 erick20 closed this as completed Jan 11, 2024
@raman-m
Copy link
Member

raman-m commented Jan 11, 2024

There is no intention... 🆗

Erick,
When we will start working on #1229 we will reopen this your issue to allow you to watch for the development & delivery of the feature.
Stay with Ocelot! 💪

@raman-m
Copy link
Member

raman-m commented Oct 4, 2024

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

@raman-m
Copy link
Member

raman-m commented Nov 24, 2024

@erick20 closed this as completed on Jan 11

Hi man! Why not to open a pull request?
Are you professional C# developer?

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

No branches or pull requests

2 participants