HostLoom.RateLimiting.HttpClient
0.20.0
dotnet add package HostLoom.RateLimiting.HttpClient --version 0.20.0
NuGet\Install-Package HostLoom.RateLimiting.HttpClient -Version 0.20.0
<PackageReference Include="HostLoom.RateLimiting.HttpClient" Version="0.20.0" />
<PackageVersion Include="HostLoom.RateLimiting.HttpClient" Version="0.20.0" />
<PackageReference Include="HostLoom.RateLimiting.HttpClient" />
paket add HostLoom.RateLimiting.HttpClient --version 0.20.0
#r "nuget: HostLoom.RateLimiting.HttpClient, 0.20.0"
#:package HostLoom.RateLimiting.HttpClient@0.20.0
#addin nuget:?package=HostLoom.RateLimiting.HttpClient&version=0.20.0
#tool nuget:?package=HostLoom.RateLimiting.HttpClient&version=0.20.0
HostLoom.RateLimiting.HttpClient
Outgoing HttpClient integration for HostLoom rate limiter profiles. The handler acquires one
permit per physical HTTP attempt, supports bounded local waiting, and throws typed exceptions for
local rejection or backend denial instead of manufacturing HTTP 429 responses.
builder.Services
.AddHttpClient("catalog", client =>
client.BaseAddress = new Uri("https://catalog.example"))
.AddHostLoomRateLimit("catalog-api", options =>
{
options.MaxWait = TimeSpan.FromSeconds(2);
options.QueueLimit = 32;
});
Register the rate limiter after retry or hedging handlers so it sits closest to the network and charges every physical attempt. Register it before those handlers to charge only the logical request instead.
MaxWait includes store acquisition and local delay time. QueueLimit bounds callers in the wait
loop for one handler pipeline; it is not a global queue and has no oldest-first or cross-instance
FIFO guarantee. Both defaults are zero, which rejects immediately. A positive MaxWait requires a
positive QueueLimit.
RateLimitExceededExceptionreports local exhaustion and an optionalRetryAfter.RateLimiterUnavailableExceptionreports a store failure whenOnUnavailableisDeny.- Explicitly degraded admissions and ordinary responses, including a real downstream 429, proceed unchanged.
- Handler disposal does not dispose the shared limiter.
RateLimitedHttpMessageHandler also has a public constructor for container-free composition.
| 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.Http (>= 10.0.14)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.14)
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 |
|---|---|---|
| 0.20.0 | 64 | 10/31/2026 |