Paul Krill
Editor at Large

Microsoft .NET 7 will include rate limiting

news
Jul 14, 20222 mins

Microsoft announced that the next version of .NET will provide multiple different rate limiting algorithms that allow developers to control the flow of requests to application resources.

speed bump ahead sign
Credit: Andrew Rivett

Microsoft .NET 7, a planned upgrade to Microsoft’s flagship software development platform, is set to feature built-in rate limiting, a mechanism designed to protect an application from being overwhelmed with traffic.

Microsoft provided details in a July 13 blog post. Rate limiting provides control over how much a resource can be accessed. For example, a developer might know that a database an application accesses can safely handle 1,000 requests per minute. A rate limiter could be put in the application that allows 1,000 requests but rejects requests beyond that number before they can access the database.

Microsoft .NET 7 will feature multiple rate limiting algorithms to control the flow of requests. Among these are a concurrency limiter to limit the number of concurrent requests; a token bucket limit, a way to regulate application requests using tokens; a fixed window limit, which resets the limit back to a starting point after a certain period of time; and a sliding window limit, which is similar to the fixed window algorithm but divides the time window into segments.

Microsoft has released a Nuget package, System.Threading.RateLimiting, that provides primitives for writing rate limiters using common algorithms. Rate limiting middleware is provided in the Microsoft.Asp.NetCoreRateLimiting Nuget package.

Microsoft seeks developers’ feedback on .NET 7’s rate limiting APIs. For the rate limiting APIs in the System.Threading.RateLimiting namespace, use the System.Threading.RateLimiting Nuget package and provide feedback in the Runtime GitHub repo. For rate limiting middleware, use the Microsoft.AspNetCore.RateLimiting Nuget package and provide feedback in the AspNetCore GitHub repo.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author