{"id":18798711,"url":"https://github.com/liteobject/demo.rate.limiting","last_synced_at":"2026-01-02T03:30:14.085Z","repository":{"id":90788737,"uuid":"528667574","full_name":"LiteObject/Demo.Rate.Limiting","owner":"LiteObject","description":"Rate limiting is the concept of limiting how much a resource can be accessed","archived":false,"fork":false,"pushed_at":"2022-08-25T02:51:47.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-29T18:23:53.782Z","etag":null,"topics":["api","csharp","rate-limiting"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LiteObject.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-25T02:34:52.000Z","updated_at":"2023-04-09T16:37:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"62971f51-bc3b-45b3-b6e0-812cacfe9413","html_url":"https://github.com/LiteObject/Demo.Rate.Limiting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteObject%2FDemo.Rate.Limiting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteObject%2FDemo.Rate.Limiting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteObject%2FDemo.Rate.Limiting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LiteObject%2FDemo.Rate.Limiting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LiteObject","download_url":"https://codeload.github.com/LiteObject/Demo.Rate.Limiting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239727055,"owners_count":19687099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","rate-limiting"],"created_at":"2024-11-07T22:12:43.559Z","updated_at":"2026-01-02T03:30:14.041Z","avatar_url":"https://github.com/LiteObject.png","language":"C#","readme":"# What is rate limiting?\nRate limiting is the concept of limiting how much a resource can be accessed.\n\n## About this project:\n- This is a custom implementation (without worrying too much about algo)\n- Rate limiting can be applied to action method using one or more attributes as shown below:\n```csharp\n[RateLimiter(RateLimitingRule = typeof(RateLimitingRuleForUS), MaxReqCount = 5, TimeSpanInSec = 30)]\n[RateLimiter(RateLimitingRule = typeof(RateLimitingRuleForEU))]\n[HttpGet(Name = \"GetWeatherForecast\")]\npublic IEnumerable\u003cWeatherForecast\u003e Get()\n{\n}\n```\n\n- Either max request count within a time range can be specifid from the attribue or it can be configued centrally in the `RateLimitingMiddleware.cs` file.\n- In this example, rate limiting rule(s) is picked based on header (token) value. This loggic is within `RulesManager.cs` file. \n However, this matching of header value with rule(s) can be easily removed.\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliteobject%2Fdemo.rate.limiting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliteobject%2Fdemo.rate.limiting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliteobject%2Fdemo.rate.limiting/lists"}