spring-cloud / spring-cloud/spring-cloud-gateway

Bucket4jAutoConfiguration seems cann't support bandwidths

Open
#4,097 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

waiting-for-triage
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

Is your feature request related to a problem? Please describe.
below config doesn't work

filters:
  - name:RequestRateLimiter
    args:
      bucket4j-rate-limiter.capacity: 100
      bucket4j-rate-limiter.refill-tokens: 100
      bucket4j-rate-limiter.refill-period: 1m
      bucket4j-rate-limiter.bandwidths: 
        - refill-period: 1m
          refill-tokens: 100
          capacity: 100
        - refill-period: 10m
          refill-tokens: 1000
          capacity: 1000

Describe the solution you'd like
hope it is supported

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the Bucket4jAutoConfiguration entry point and the YAML example in this issue. Check how the existing RequestRateLimiter arguments are bound, then determine what support for multiple bandwidths should mean. Done means the example configuration is accepted and its multiple bandwidth limits work as expected, with coverage in the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.