-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Questions for Rate Limiting #910
Comments
One more question. I am trying to use the LoadBalancer in this demo, so I change the reroute as below. {
"DownstreamPathTemplate": "/api/ocelot/{postId}",
"DownstreamScheme": "http",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 8001
},
{
"Host": "localhost",
"Port": 8002
}
],
"UpstreamPathTemplate": "/ocelot/ratelimit/{postId}",
"UpstreamHttpMethod": [ "Get" ],
"Priority": 2,
"RateLimitOptions": {
"ClientWhiteList": [
"markadmin"
],
"EnableRateLimiting": true,
"Period": "1m",
"PeriodTimespan": 10,
"Limit": 5
},
"LoadBalancerOptions": {
"Type": "RoundRobin"
}
} As the document say that I do the test as below. |
@markjiang7m2, can you please tell me from where you are getting |
Hi Mark! Current Rate Limiting issues So, I'll keep this issue open, to let it be fixed together with #1590... |
Regarding Load Balancer and RoundRobin... |
Expected Behavior
I setup a demo for Ocelot Rate Limiting function. Period: 1m, PeriodTimespan: 10, Limit: 5. As per the Documentation for Rate Limiting, The count of request should be limitted as 5 in 1 min, and then after 10 seconds, it will works again.
Actual Behavior
I setup a console project for sending the request. It will sleep 1s after got a response. Below is the output:
It is 5 successes, 5 rejects as period.
Then I change the RateLimitOptions as Period: 1m, PeriodTimespan: 10, Limit: 6, and I got 6 successes, 4 rejects as period.
My Questions
Steps to Reproduce the Problem
Api service:
Ocelot.json:
Console project:
Specifications
The text was updated successfully, but these errors were encountered: