ThrottlingTroll.AzureFunctions
9.1.0
dotnet add package ThrottlingTroll.AzureFunctions --version 9.1.0
NuGet\Install-Package ThrottlingTroll.AzureFunctions -Version 9.1.0
<PackageReference Include="ThrottlingTroll.AzureFunctions" Version="9.1.0" />
<PackageVersion Include="ThrottlingTroll.AzureFunctions" Version="9.1.0" />
<PackageReference Include="ThrottlingTroll.AzureFunctions" />
paket add ThrottlingTroll.AzureFunctions --version 9.1.0
#r "nuget: ThrottlingTroll.AzureFunctions, 9.1.0"
#:package ThrottlingTroll.AzureFunctions@9.1.0
#addin nuget:?package=ThrottlingTroll.AzureFunctions&version=9.1.0
#tool nuget:?package=ThrottlingTroll.AzureFunctions&version=9.1.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 |
|---|---|---|
| 9.1.0 | 204 | 1/7/2026 |
| 9.0.0 | 629 | 12/23/2025 |
| 9.0.0-beta3 | 188 | 12/22/2025 |
| 9.0.0-beta2 | 191 | 12/22/2025 |
| 9.0.0-beta1 | 157 | 12/21/2025 |
| 8.0.0 | 3,718 | 7/1/2025 |
| 8.0.0-beta3 | 184 | 6/30/2025 |
| 8.0.0-beta2 | 182 | 6/29/2025 |
| 8.0.0-beta1 | 139 | 6/28/2025 |
| 7.3.0 | 17,734 | 10/14/2024 |
| 7.2.0 | 2,730 | 8/31/2024 |
| 7.2.0-beta1 | 193 | 8/31/2024 |
| 7.1.2 | 3,141 | 6/12/2024 |
| 7.1.1 | 467 | 6/3/2024 |
| 7.1.0 | 230 | 6/1/2024 |
| 7.1.0-beta1 | 163 | 6/1/2024 |
| 7.0.0 | 537 | 5/15/2024 |
| 7.0.0-beta2 | 162 | 5/10/2024 |
| 7.0.0-beta1 | 160 | 5/5/2024 |
| 6.1.2 | 971 | 4/5/2024 |
| 6.1.1 | 1,443 | 1/28/2024 |
| 6.1.0 | 206 | 1/28/2024 |
| 6.0.0 | 875 | 12/4/2023 |
| 6.0.0-beta6 | 241 | 11/26/2023 |
| 6.0.0-beta5 | 178 | 11/26/2023 |
| 6.0.0-beta4 | 189 | 11/26/2023 |
| 6.0.0-beta3 | 170 | 11/26/2023 |
| 6.0.0-beta2 | 159 | 11/26/2023 |
| 6.0.0-beta1 | 148 | 11/25/2023 |
| 5.0.0 | 4,451 | 11/2/2023 |
| 4.0.5 | 1,125 | 8/27/2023 |
| 4.0.4 | 389 | 7/22/2023 |
| 4.0.2 | 262 | 7/22/2023 |
| 4.0.1 | 278 | 7/22/2023 |
| 4.0.0 | 267 | 7/22/2023 |
| 3.0.4 | 657 | 5/17/2023 |
| 3.0.3 | 272 | 5/15/2023 |
| 3.0.2 | 268 | 5/14/2023 |
| 3.0.1 | 274 | 5/14/2023 |
| 3.0.0 | 258 | 5/13/2023 |
| 2.0.1 | 427 | 4/1/2023 |