ThrottlingTroll.AzureFunctions
10.0.0
dotnet add package ThrottlingTroll.AzureFunctions --version 10.0.0
NuGet\Install-Package ThrottlingTroll.AzureFunctions -Version 10.0.0
<PackageReference Include="ThrottlingTroll.AzureFunctions" Version="10.0.0" />
<PackageVersion Include="ThrottlingTroll.AzureFunctions" Version="10.0.0" />
<PackageReference Include="ThrottlingTroll.AzureFunctions" />
paket add ThrottlingTroll.AzureFunctions --version 10.0.0
#r "nuget: ThrottlingTroll.AzureFunctions, 10.0.0"
#:package ThrottlingTroll.AzureFunctions@10.0.0
#addin nuget:?package=ThrottlingTroll.AzureFunctions&version=10.0.0
#tool nuget:?package=ThrottlingTroll.AzureFunctions&version=10.0.0
ThrottlingTroll.AzureFunctions
Rate limiting/throttling middleware for Azure Functions. Can be used both in InProc and Isolated projects, both with "classic" HTTP-triggered Functions and with ASP.Net Core Integration.
Install from NuGet:
dotnet add package ThrottlingTroll.AzureFunctions
How to use (.NET Isolated)
Make sure you call one or another form of .UseThrottlingTroll() method at startup:
var builder = new HostBuilder();
// .....
builder.ConfigureFunctionsWebApplication((builderContext, workerAppBuilder) => {
workerAppBuilder.UseThrottlingTroll();
// .....
});
How to use (.NET InProc)
- Use
.AddThrottlingTroll()method to add ThrottlingTroll to your DI container at startup:
[assembly: WebJobsStartup(typeof(ThrottlingTrollSampleInProcFunction.Startup.Startup))]
namespace ThrottlingTrollSampleInProcFunction.Startup
{
public class Startup : IWebJobsStartup
{
public void Configure(IWebJobsBuilder builder)
{
builder.Services.AddThrottlingTroll(options =>
{
// In InProc Functions config sections loaded from host.json have the "AzureFunctionsJobHost:" prefix in their names
options.ConfigSectionName = "AzureFunctionsJobHost:ThrottlingTrollIngress";
// .....
});
}
}
}
Add InProc-specific implementation of IHttpRequestProxy to your project.
Wrap your Functions with
.WithThrottlingTroll()method, like this:
public class MyFunctions
{
private readonly IThrottlingTroll _thtr;
public Functions(IThrottlingTroll thtr)
{
this._thtr = thtr;
}
[FunctionName("MyFunc")]
public Task<IActionResult> MyFunc([HttpTrigger(AuthorizationLevel.Anonymous, "get")] HttpRequest req)
=> this._thtr.WithThrottlingTroll(new InProcHttpRequestProxy(req),
async ctx =>
{
// Your code goes here ...
return (IActionResult)new OkObjectResult("OK");
},
async ctx =>
{
return (IActionResult)new StatusCodeResult((int)HttpStatusCode.TooManyRequests);
});
}
Samples
Sample Azure Functions projects (both InProc and Isolated) are located in this separate repo.
| 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. |
-
- Microsoft.Azure.Functions.Worker (>= 2.2.0)
- Microsoft.Azure.Functions.Worker.Extensions.Http (>= 3.3.0)
- Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore (>= 2.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- System.Runtime.Caching (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on ThrottlingTroll.AzureFunctions:
| Repository | Stars |
|---|---|
|
JitHubApp/JitHubV2
GitHub WinUI Client
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 0 | 3/7/2026 |
| 10.0.0-beta3 | 28 | 3/6/2026 |
| 10.0.0-beta2 | 65 | 3/3/2026 |
| 10.0.0-beta1 | 95 | 3/1/2026 |
| 9.2.0 | 422 | 2/1/2026 |
| 9.1.0 | 547 | 1/7/2026 |
| 9.0.0 | 736 | 12/23/2025 |
| 9.0.0-beta3 | 207 | 12/22/2025 |
| 9.0.0-beta2 | 202 | 12/22/2025 |
| 9.0.0-beta1 | 167 | 12/21/2025 |
| 8.0.0 | 3,795 | 7/1/2025 |
| 8.0.0-beta3 | 202 | 6/30/2025 |
| 8.0.0-beta2 | 195 | 6/29/2025 |
| 8.0.0-beta1 | 150 | 6/28/2025 |
| 7.3.0 | 18,687 | 10/14/2024 |
| 7.2.0 | 2,755 | 8/31/2024 |
| 7.2.0-beta1 | 210 | 8/31/2024 |
| 7.1.2 | 3,259 | 6/12/2024 |
| 7.1.1 | 490 | 6/3/2024 |
| 7.1.0 | 257 | 6/1/2024 |