![]() |
VOOZH | about |
dotnet add package AICentral.RateLimiting.DistributedRedis --version 0.21.0
NuGet\Install-Package AICentral.RateLimiting.DistributedRedis -Version 0.21.0
<PackageReference Include="AICentral.RateLimiting.DistributedRedis" Version="0.21.0" />
<PackageVersion Include="AICentral.RateLimiting.DistributedRedis" Version="0.21.0" />Directory.Packages.props
<PackageReference Include="AICentral.RateLimiting.DistributedRedis" />Project file
paket add AICentral.RateLimiting.DistributedRedis --version 0.21.0
#r "nuget: AICentral.RateLimiting.DistributedRedis, 0.21.0"
#:package AICentral.RateLimiting.DistributedRedis@0.21.0
#addin nuget:?package=AICentral.RateLimiting.DistributedRedis&version=0.21.0Install as a Cake Addin
#tool nuget:?package=AICentral.RateLimiting.DistributedRedis&version=0.21.0Install as a Cake Tool
A Distributed Rate Limiter for use with (AICentral)[www.github.com/microsoft/aicentral]
dotnet add package AICentral.RateLimiting.DistributedRedis
builder.Services.AddAICentral(
builder.Configuration,
additionalComponentAssemblies:
[
typeof(DistributedRateLimiter).Assembly,
]);
{
"AICentral": {
"GenericSteps": [
{
"Type": "DistributedRateLimiter",
"Name": "request-rate-limiter",
"Properties": {
"LimitType": "PerEndpoint|PerConsumer",
"MetricType": "Tokens|Requests",
"Window": "00:00:10",
"PermitLimit": 100,
"RedisConfiguration" : "<Redis connection string>"
}
}
]
}
}
For each pipeline a Redis Key is constructed which will identify this pipeline (optionally and the client) across AICentral Instances. We store a Hash against this Redis key which is the current count of requests or tokens used.
Importantly the Hash Key contains a value derived from a Static point in time and the window information. This means the Key will always be the same across instances.
The Rate Limiter checks the sum of all the Hashes for the current window and if it is greater than the limit then the request is rejected. The key automatically changes as we enter a new window meaning the totals are reset.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.21.0 | 217 | 12/9/2024 |
| 0.21.0-pullrequest0152-0005 | 209 | 12/9/2024 |
| 0.21.0-pullrequest0152-0004 | 194 | 12/9/2024 |
| 0.20.5 | 213 | 9/30/2024 |
| 0.20.5-pullrequest0148-0004 | 183 | 9/30/2024 |
| 0.20.5-pullrequest0148-0002 | 152 | 9/30/2024 |
| 0.20.3 | 212 | 9/5/2024 |
| 0.20.3-pullrequest0146-0005 | 193 | 9/5/2024 |
| 0.20.3-pullrequest0146-0004 | 178 | 9/5/2024 |
| 0.20.0 | 203 | 8/17/2024 |
| 0.20.0-pullrequest0143-0013 | 170 | 8/17/2024 |
| 0.20.0-pullrequest0143-0012 | 181 | 8/17/2024 |
| 0.20.0-pullrequest0143-0011 | 175 | 8/17/2024 |
| 0.20.0-pullrequest0143-0010 | 189 | 8/17/2024 |
| 0.20.0-pullrequest0143-0009 | 188 | 8/17/2024 |
| 0.19.6-pullrequest0143-0008 | 186 | 8/17/2024 |
| 0.19.0 | 202 | 7/29/2024 |
| 0.19.0-pullrequest0136-0014 | 158 | 7/29/2024 |
| 0.19.0-pullrequest0136-0013 | 165 | 7/29/2024 |
| 0.19.0-pullrequest0136-0012 | 154 | 7/29/2024 |