In the Redis implementation of the RequestRateLimiter, we must specify two properties redis-rate-limiter.replenishRate and redis-rate-limiter.burstCapacity as arguments for the RequestRateLimiter filter.
According to the documentation,
The
redis-rate-limiter.replenishRateis how many requests per second do you want a user to be allowed to do, without any dropped requests. This is the rate that the token bucket is filled.The
redis-rate-limiter.burstCapacityis the maximum number of requests a user is allowed to do in a single second. This is the number of tokens the token bucket can hold. Setting this value to zero will block all requests.
From what I see, replenishRate is the rate at which the requests are being made, and the burstCapacity is the maximum requests that can be made (both under one second).
However, I can't seem to understand the difference between the two in a practical scenario.