Comments on: Rate Limiting In Spring Cloud Gateway With Redis https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/ Java, Spring, Kotlin, microservices, Kubernetes, containers Mon, 30 Jan 2023 08:46:23 +0000 hourly 1 https://wordpress.org/?v=6.9.1 By: piotr.minkowski https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1817 Mon, 30 Jan 2023 08:46:23 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1817 In reply to Aylin.

In that case you need to define key-resolver bean.

]]>
By: piotr.minkowski https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1808 Wed, 18 Jan 2023 23:27:03 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1808 In reply to Prateek.

Because there is no account-service. It is mocked. Here’s the full code: https://github.com/piomin/sample-spring-cloud-gateway/blob/master/src/test/java/pl/piomin/services/gateway/GatewayRateLimiterTest.java

]]>
By: Prateek https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1794 Fri, 13 Jan 2023 09:52:05 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1794 Hi,
Could you share a link to other resources, it expects Account-service to be up, I dont see its code

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: localhost/0:0:0:0:0:0:0:1:8091
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]

]]>
By: Aylin https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1338 Mon, 03 Jan 2022 11:09:24 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1338 i am getting exception in tests when i set key-resolver
key-resolver: “#{userKeyResolver}”

it throws this exception:
reactor.core.Exceptions$ErrorCallbackNotImplemented: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field ‘userKeyResolver’ cannot be found on null
Caused by: org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field ‘userKeyResolver’ cannot be found on null

]]>
By: piotr.minkowski https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1237 Tue, 31 Aug 2021 15:24:26 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1237 In reply to Jigar Prajapati.

Yes

]]>
By: Jigar Prajapati https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1226 Tue, 24 Aug 2021 09:40:32 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1226 Does it will save rate limit as key in redis ?

]]>
By: piotr.minkowski https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-1000 Wed, 20 Jan 2021 10:11:33 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-1000 In reply to Sagar Gaikwad.

You can always create a RouteLocator bean and do it as visible below:

@Bean
public RouteLocator routes(RouteLocatorBuilder builder) {
return builder.routes()...
}

]]>
By: Sagar Gaikwad https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-992 Tue, 19 Jan 2021 12:15:30 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-992 How to set rate limit programmatically and not through properties?

]]>
By: Ahmed https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-741 Wed, 22 Jul 2020 10:29:49 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-741 First of all thanks for this great tutorial, Piotr!
I have a question, can we increase replenishRate to be per 10 seconds or per minute or more based on the route? Or generally increase this rate?
I tried to search a little bit and found that there is a redis lua script inside spring cloud gateway source code but I don’t know lua and I am not sure that would be the way to go to edit the window of replenishRate.

]]>
By: Devender Chaudhary https://piotrminkowski.com/2019/11/15/rate-limiting-in-spring-cloud-gateway-with-redis/#comment-739 Sun, 03 May 2020 18:52:48 +0000 https://piotrminkowski.wordpress.com/?p=7193#comment-739 I tried integrating it with my project, but i am getting this error
java.lang.IllegalArgumentException: Unable to find GatewayFilterFactory with name RequestRateLimiter

Kind help if I am missing any thing.

]]>