Closed BaekSeungYeol closed 1 year ago
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file.
@ryanjbaxter hi, i added a demo project link. it briefly reproduce the situation of sending a request to a demo-backend server through a demo-gateway.
demo : https://github.com/BaekSeungYeol/demo-ratelimiter-sample
As stated in the README, If i run demo-gateway, demo-backend-server and send a localhost:8080/test2 request, the response is not what I expected. isn't it correct that an error occurs due to the rate limiter that is allowed once in 60 seconds? If i'm wrong, please tell me, thank you.
This doesn't work because we are not configuring the RateLimiter and applying it in Spring Cloud CircuitBreaker. Frankly RateLimiting is a bit separate from Circuit Breakers. In this particular case I would suggest you look into the Rate Limiter provided by Spring Cloud Gateway
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Describe the bug spring cloud gateway resilience4j rate limiter is not working. if i'm wrong please tell me.
Sample this is my code.
i defined rate limiter in .yml file. and added to gateway routes like this
I tried sending a request through postman, but there was no limit on the request. I changed the rateLimiter to timeLimiter and gave timeoutDuration like this.
and it worked fine, but I don't know why ratelimiter doesn't work.