ThreeMammals / Ocelot

.NET API Gateway

Home Page:https://www.nuget.org/packages/Ocelot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rate Limiting issues in Ocelot

SheruGaur opened this issue · comments

Rate Limit is not working when period and period timespan values are different. When we are making same value for period and period timespan then it is working for Rate limiting on configured service. In below configuration first case Rate Limiting is working and in second case Rate Limiting is not working.

  1. First Case
    "RateLimitOptions": {
    "ClientWhitelist": ["HOR777"],
    "EnableRateLimiting": true,
    "Period": "10s",
    "PeriodTimespan": 10,
    "Limit": 2
    },
  2. Second Case
    "RateLimitOptions": {
    "ClientWhitelist": ["HOR777"],
    "EnableRateLimiting": true,
    "Period": "10s",
    "PeriodTimespan": 15,
    "Limit": 2
    },
    Please provide the solution because rate Limiting is not working as per Ocelot documentation. Please provide it is product backlog or ongoing issues.

Thanks for reporting to us once again! But this is well-known #1590 bug ❕
And we have open PR #1592 to fix this bug.
Please, be patient! We're planning to fix this bug in Annual 2023 release which dev will start soon...

As a quick fix, define PeriodTimespan value less than (or equal to) Period

Duplicate of #1590

And stop terrifying us with duplicated bugs ❗

Please start your contribution to the project! 🆗❔
What's your LinkedIn?

Thanks, you @raman-m for update and solution. Currently I am fully occupied in my ongoing project. Sure, I will be ready to contribute to your project whenever i am free up here.

@raman-m My linkdin id is Sheru Kumar Gaur

Please watch for PR #1592 #1590 news!
Closing because of duplication...