Cristi Pufu

Results 11 issues of Cristi Pufu

Hi guys, First of all I want to thank you all for the time, talent and work you've invested in this project, it's _awesome_. Recently I started porting this project...

feature
server

If you haven't heard yet, .NET 7 comes with built-in support for Rate Limiting (in-memory): https://devblogs.microsoft.com/dotnet/announcing-rate-limiting-for-dotnet/ I have created another repository for multi-node deployments (with Redis) and my future contributions...

Custom middleware ```diff public interface IRateLimiterPolicy { Func? OnRejected { get; } + Func? OnAcquired { get; } } ``` ```diff public sealed class RateLimiterOptions { public Func? OnRejected {...

enhancement

https://github.com/dotnet/aspnetcore/issues/44907 ```C# [EnableRateLimiting("policy_fixed_window", "policy_concurrency")] public class DemoController : ControllerBase ```

enhancement

Use `RateLimiter.GetStatistics()` + `OpenTelemetry.Metrics` ![Fg0wgFFacAEhEkP](https://user-images.githubusercontent.com/3955285/200177556-944a4ec4-901d-4938-b065-5687b8bcf881.jpg)

enhancement

```C# public override RateLimiterStatistics? GetStatistics() { throw new NotImplementedException(); } ```

enhancement

https://github.com/dotnet/runtime/issues/77669 ```C# private void Release(ConcurencyLeaseContext leaseContext) { var database = _connectionMultiplexer.GetDatabase(); // how to use async? if only RateLimitLease would implement IAsyncDisposable database.SortedSetRemove($"rl:{_partitionKey}", leaseContext.RequestId); } ```

enhancement

What happens if we can't connect to Redis? Should we fail the request? Should we swallow the exception? Should we configure the behavior?

enhancement