Open aleksatoroman opened 1 year ago
Tagging subscribers to this area: @mangod9 See info in area-owners.md if you want to be subscribed.
Author: | aleksatoroman |
---|---|
Assignees: | - |
Labels: | `area-System.Threading`, `untriaged` |
Milestone: | - |
@BrennanConroy
Description
When using the
FixedWindowRateLimiter
, the value set for theRetry-After
header reflects the entire time window specified in the policy configuration rather than the remaining time until the next permissible request.Reproduction Steps
2.
Configure a
Window
option for, let's say,00:01:00
. After reaching the maximum request limit for this window, inspect the Retry-After header. A visual representation of the issue can be foundExpected behavior
The
Retry-After
header should reflect the remaining time until the next request is permissible, like some other implementations are doing, such as Redis-based rate limiting that is built on top of this one found here.Actual behavior
The
Retry-After
header only reflects the static window value defined in the policy's configuration, ignoring the elapsed time.Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
This
RateLimiting
middleware is used in combination with myYARP
reverse proxy gateway based on the following documentation: YARP rate limiting