HostLoom.RateLimiting.DependencyInjection
0.20.0
dotnet add package HostLoom.RateLimiting.DependencyInjection --version 0.20.0
NuGet\Install-Package HostLoom.RateLimiting.DependencyInjection -Version 0.20.0
<PackageReference Include="HostLoom.RateLimiting.DependencyInjection" Version="0.20.0" />
<PackageVersion Include="HostLoom.RateLimiting.DependencyInjection" Version="0.20.0" />
<PackageReference Include="HostLoom.RateLimiting.DependencyInjection" />
paket add HostLoom.RateLimiting.DependencyInjection --version 0.20.0
#r "nuget: HostLoom.RateLimiting.DependencyInjection, 0.20.0"
#:package HostLoom.RateLimiting.DependencyInjection@0.20.0
#addin nuget:?package=HostLoom.RateLimiting.DependencyInjection&version=0.20.0
#tool nuget:?package=HostLoom.RateLimiting.DependencyInjection&version=0.20.0
HostLoom.RateLimiting.DependencyInjection
Registers default and named RateLimiter profiles, backend stores, options validation, and
readiness checks for HostLoom rate limiting.
builder.Services
.AddHostLoomRateLimiting("catalog-api", options =>
{
options.Namespace = "catalog";
options.TokenBucket = new TokenBucketRateLimitPolicy
{
TokenLimit = 100,
TokensPerPeriod = 100,
ReplenishmentPeriod = TimeSpan.FromSeconds(1),
};
})
.UseRedis()
.AddHealthChecks();
Use UseInMemory() for process-local operation, UseRedis() from HostLoom.Redis, or
UseValkey() from HostLoom.Valkey. Each profile selects exactly one store. Redis or Valkey uses
the same named connection as caching and locking when the profile and backend match; different
profiles isolate their connections. Readiness uses the backend probe when available and never
changes liveness.
Resolve the default limiter as RateLimiter, or a named limiter with
GetRequiredKeyedService<RateLimiter>("catalog-api"). DistributedRateLimiter is registered as a
concrete service too. The container owns the limiter and store; an HTTP handler does not dispose
them.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- HostLoom.RateLimiting (>= 0.20.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.14)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.14)
- Microsoft.Extensions.Options (>= 10.0.14)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on HostLoom.RateLimiting.DependencyInjection:
| Package | Downloads |
|---|---|
|
HostLoom.Redis
Redis backend for HostLoom caching, locking, and rate limiting over shared connections and StackExchange.Redis. |
|
|
HostLoom.Valkey
Standalone Valkey backend for HostLoom caching, coordination locks, and token-bucket rate limiting over ValkeyDotNet. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.20.0 | 88 | 10/31/2026 |