{"repo":"nimanikoo/Dotnet-RateLimiter","free":true,"listed":false,"github":"https://github.com/nimanikoo/Dotnet-RateLimiter","clone":"git clone https://github.com/nimanikoo/Dotnet-RateLimiter.git","description":"🚀 High-performance Distributed Rate Limiter for .NET 10. Powered by Redis & Atomic Lua Scripting to eliminate race conditions. Features Fixed/Sliding Window, Token Bucket, and Concurrency strategies with built-in Health Monitoring & Docker orchestration","language":"C#","stars":23,"topics":["algorithm","rate-limiting","docker","dotnet","high-performance","lua","redis"],"license":null,"category":"deployment-docker-iac","readme_excerpt":"🚀 Distributed Rate Limiter: The High-Performance Suite for .NET 10 Dotnet-RateLimiter is not just a simple throttling tool; it is a production-ready distributed infrastructure designed to handle high-traffic environments. By combining the cutting-edge features of .NET 10 with the raw power of Redis Lua Scripting , this project solves the most critical challenges of rate limiting in microservices: Race Conditions and Consistency . --- 💎 The Engineering Excellence: Why Redis + Lua? In a distributed environment (multiple API instances), standard in-memory limiting fails because each server has its own state. Our solution moves the \"Source of Truth\" to Redis, optimized by server-side Lua execution. ⚡ Atomic \"Read-Modify-Write\" Most distributed limiters suffer from Race Conditions . If two requests hit two different servers at the exact same millisecond, they might both read a counter of 9 (limit 10 ) and both proceed, incorrectly allowing 11 requests. Our Solution: We offload the entire logic to a Lua Script executed inside Redis. Redis guarantees that the script runs as a single atomic operation. No other command can run until the logic is finished. Consistency is 100% guaranteed. 🧠 Identity-Aware Logic The system intelligently resolves client identities to ensure fair usage: - Authenticated Users: Automatically tracks limits via User.Identity (Claims-based). - Anonymous Guests: Falls back to Client IP resolution. - Granular Scoping: Limits are unique per User/IP + API Path ,","default_branch":null,"files":null,"tree":[],"storefront":"/r/nimanikoo","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nimanikoo/Dotnet-RateLimiter/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}