RateLimiter.AspNetCore
1.0.0
dotnet add package RateLimiter.AspNetCore --version 1.0.0
NuGet\Install-Package RateLimiter.AspNetCore -Version 1.0.0
<PackageReference Include="RateLimiter.AspNetCore" Version="1.0.0" />
<PackageVersion Include="RateLimiter.AspNetCore" Version="1.0.0" />
<PackageReference Include="RateLimiter.AspNetCore" />
paket add RateLimiter.AspNetCore --version 1.0.0
#r "nuget: RateLimiter.AspNetCore, 1.0.0"
#:package RateLimiter.AspNetCore@1.0.0
#addin nuget:?package=RateLimiter.AspNetCore&version=1.0.0
#tool nuget:?package=RateLimiter.AspNetCore&version=1.0.0
RateLimiter.Redis
This library helps protect your API from excessive requests by implementing rate limiting with Redis (or local caching).
Features
- IP-based rate limiting to control excessive API requests.
- Customizable rate limiting policies based on request limits and time windows.
- Easy integration with ASP.NET Core middleware.
Usage
Install the package from NuGet:
dotnet add package RateLimiter.Redis
Add the rate limiter services in Program.cs:
builder.Services.AddLimiter(redisConnection: "localhost:1453", options =>
{
options.CacheType = CacheType.Redis;
options.MaxRequestCount = 10;
options.TimeInterval = TimeSpan.FromSeconds(100);
});
and
app.UseLimiter();
The middleware automatically restricts API requests based on the configured limits. If a client exceeds the limit, they receive a 429 Too Many Requests response.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.Extensions.Caching.Memory (>= 8.0.1)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 8.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 243 | 2/10/2025 |
RedisRateLimiter.AspNetCore is a NuGet package that provides an IP-based Rate Limiting mechanism for ASP.NET Core applications. It uses a Redis and local caching.