i want to configure the same setting using java classes . This is the yml file i have:…
Jump to turn (10)
- 1i want to configure the same setting using java classes . This is the yml file i
- 2explain the difference between replenishrate - burst capacity and requested toke
- 3what about if i want to set the refill of the bucket for example every 1min it s
- 4what about the token bucket algorithm. Let's say i have 10 tokens per minute and
- 5show me this example in the code
- 6how can i understand if it is per minute/second or hour? where should i set this
- 7is it possible to use bucket4j library and its utilities classes to configure th
- 8so in this example there is no more redis?
- 9is it possible to use the gateways and redis, but to set a filter with bucket4j
- 10how can i set this rate limiter in order to have 10 calls per minute and a refil
- User
i want to configure the same setting using java classes . This is the yml file i have:
spring: cloud: gateway: routes: - id: route1 uri: http://localhost:8081 predicates: - Path=/backend filters: - name: RequestRateLimiter args: redis-rate-limiter.replenishRate: 500 redis-rate-limiter.burstCapacity: 1000 redis-rate-limiter.requestedTokens: 1
this is how i need it to be set @Bean public RouteLocator myRoutes(RouteLocatorBuilder builder) { return builder.routes() .route(p -> p .path("/get") .filters(f -> f.addRequestHeader("Hello", "World") ) .uri("http://httpbin.org:80")) .build(); }
- Assistant