spring-cloud / spring-cloud/spring-cloud-gateway
Allow making replenishRate float?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
Hello!
In some cases it can be useful to make replenishRate float (special cases when 0<replenishRate< 1). So we will be able for example to increase value in the bucket by values < 1 every second (so value 0.1 means to fulfill bucket with 1 token every 10 seconds).
No code changes has be made for lua script to do this, only for config class.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/ratelimit/RedisRateLimiter.java at the linked configuration code. Check how replenishRate is currently represented and confirm that the existing Lua script needs no changes. Done means the configuration accepts fractional values below 1 and supports the described token replenishment behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100