[Breaking change]: Obsolete ConcurrencyLimiterMiddleware #502
Labels
8.0.0
Announcement
Breaking change
Documented
The breaking change has been published to the .NET Core docs
Description
In .NET 8.0 the ASP.NET Core team is deprecating the ConcurrencyLimiterMiddleware and associated methods and types (e.g. UseConcurrencyLimiter(...)). This package will be removed in .NET 9.0.
Developers requiring rate limiting capabilties should switch to the newer and more capable rate limiting middleware that was introduced in .NET 7.0 (e.g. UseRateLimiter(...)). The .NET 7.0 rate limiting API includes a concurrency limiter along with several other rate limiting algorithms that you can apply to your application.
For more information on rate limiting in ASP.NET Core see:
https://learn.microsoft.com/aspnet/core/performance/rate-limit
Version
.NET 8 Preview 4
Previous behavior
Developers using the
ConcurrencyLimiterMiddleware
could control concurrency by adding a policy to DI and enabling the middleware:New behavior
Here is some example usage using the new API:
Type of breaking change
Reason for change
The older
ConcurrencyLimiterMiddleware
is infrequently used and undocumented. The newer rate limiting API has more extensive functionality.Recommended action
If you are using the older
ConcurrencyLimiterMiddleware
we recommend moving to the newer rate limiting middleware.Affected APIs
The following APIs are impacted:
ConcurrencyLimiterExtensions.UseConcurrencyLimiter(...)
ConcurrencyLimiterMiddleware
ConcurrencyLimiterOptions
The text was updated successfully, but these errors were encountered: