spring-cloud / spring-cloud-gateway

An API Gateway built on Spring Framework and Spring Boot providing routing and more.
http://cloud.spring.io
Apache License 2.0
4.55k stars 3.33k forks source link

Allow larger rate limits for extended time intervals #3595

Open TheFreaky opened 1 week ago

TheFreaky commented 1 week ago

This PR updates RedisRateLimiter to support larger values for burstCapacity by changing its type from int to long, enabling greater flexibility for extended time intervals. The changes include validation to ensure that the burstCapacity does not exceed the maximum allowed value that can be safely handled by Redis scripts, which is 2^53 - 1.

Closes #3594

pivotal-cla commented 1 week ago

@TheFreaky Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

pivotal-cla commented 1 week ago

@TheFreaky Thank you for signing the Contributor License Agreement!