dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.21k stars 9.95k forks source link

Epic: Rate Limiting #53426

Open BrennanConroy opened 8 months ago

BrennanConroy commented 8 months ago

This issue captures issues related to rate limiting work in .NET 9. Issues and categorizations are subject to change as design and planning is underway.

aKzenT commented 7 months ago

What is missing from this list is the support of multiple rate limits per endpoint (as requested in #42691 ). E.g. you want to allow your order endpoint to accept a maximum of five orders per IP per minute, but also a maximum of 100 orders per day.

ShaneCourtrille commented 6 months ago

@BrennanConroy One scenario we've run into is the need for rate limiting for the first 3 minutes of startup after which we can safely switch to no limiter. Is switching the rate limiter based on config going to be possible? Or would we just be using the concurrency limiter and changing the permit limit?

BrennanConroy commented 3 months ago

Unfortunately, the majority of this work is being pushed back to .NET 10.

jakubsemerak commented 3 months ago

Also priority queues used inside rate limiters would be pretty nice. In our case we needed to skip the queue line by priority communication to minimize response time as much as possible. So we have replaced standard Queue with PriorityQueue and everything works flawlessly. IMO priority queue inside the limiters would be more universal.

adityamandaleeka commented 1 week ago

Re-titled the issue and moved it to the backlog for now until we find time to work on this area again.