Skip to content

AddRateLimiter could have better explanation of QueueLimit #34442

@toddlucas

Description

@toddlucas

Description

I want my API to return an HTTP status code, such as 429, when the limit is reached. The default behavior appeared to be that the response was delayed. All of my tests started to block before returning 200. This happened even after I set RejectionStatusCode on the RateLimiterOptions object.

It took me a while to figure out (with the help of an LLM), that the QueueLimit being non-zero on various limiter options (like fixed) was the problem. If the documentation were updated, I'm sure that would save others some time. Thanks.

Page URL

https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit?view=aspnetcore-9.0

Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/performance/rate-limit.md

Document ID

bb96b20f-0991-d6de-4d98-192cd469460f

Article author

@tdykstra

Related Issues


Associated WorkItem - 360655

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions