Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add period for rate limiter middleware #6055

Merged
merged 5 commits into from
Jan 8, 2020
Merged

Commits on Jan 8, 2020

  1. Reintroduce period for rate limiter middleware

    We're getting some user feedback that they would like to be able to specify a
    rate limit lower than 1 request per second. One possibility would have been to
    change the "average" field to a float (e.g. 6 requests / minute would have been
    average=0.1). However, that would break the configuration (among other things)
    as TOML will not decode a value that looks like an int (no decimal point
    specified) into a Go float64.
    
    Therefore, this PR (re-)introduces the notion of a period, that allows one to
    (optionally) specify the duration for which the given average applies. The
    default value for the period is 1 second, which means if no period is specified,
    the meaning of the average does not change compared with before this change (it
    is still in requests/s).
    
    Fixes traefik#5918
    mpl authored and ldez committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    360e1b2 View commit details
    Browse the repository at this point in the history
  2. revert short mode for unit tests

    mpl authored and ldez committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    71f46b9 View commit details
    Browse the repository at this point in the history
  3. review: add missing doc.

    ldez committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    56f758d View commit details
    Browse the repository at this point in the history
  4. review: minor changes.

    ldez committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    2667adb View commit details
    Browse the repository at this point in the history
  5. review: doc.

    ldez committed Jan 8, 2020
    Configuration menu
    Copy the full SHA
    296256a View commit details
    Browse the repository at this point in the history