Ocelot
Ocelot copied to clipboard
Global rate limiting for all, multiple routes instead of every route
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
}
}
Any progress on this issue please let me know i am kind of waiting to apply ratelimiting time globally.
@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 👉
Related issues
- #1915
- #585
@neetra Hi Netra! Are you with Ocelot nowadays?
Dear @neetra, Did you read this :point_right: Global Configuration :question: