{"id":25880212,"url":"https://github.com/danielmackay/dotnet-rate-limiting","last_synced_at":"2026-06-10T10:31:43.568Z","repository":{"id":71461404,"uuid":"563803925","full_name":"danielmackay/dotnet-rate-limiting","owner":"danielmackay","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-09T11:29:24.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T22:42:50.550Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/danielmackay.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-11-09T11:23:32.000Z","updated_at":"2022-11-09T11:23:41.000Z","dependencies_parsed_at":"2023-03-11T10:36:35.515Z","dependency_job_id":null,"html_url":"https://github.com/danielmackay/dotnet-rate-limiting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielmackay/dotnet-rate-limiting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fdotnet-rate-limiting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fdotnet-rate-limiting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fdotnet-rate-limiting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fdotnet-rate-limiting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielmackay","download_url":"https://codeload.github.com/danielmackay/dotnet-rate-limiting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielmackay%2Fdotnet-rate-limiting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34149132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-03-02T13:31:09.426Z","updated_at":"2026-06-10T10:31:43.560Z","avatar_url":"https://github.com/danielmackay.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# .NET 7 Rate Limiter\n\n## Setup\n\nInstall .NET 7\n\n`winget install Microsoft.DotNet.SDK.6`\n\nInstall K6\n\n`winget install k6`\n\n## Run\n\n```ps1\ncd src\ndotnet run\n```\n\n## Test\n\n```ps1\ncd test\nk6 run .\\script.js\n```\n\nThe script sends 1 request per second.  The rate limiter allows 4 requests per 12 seconds.  As the test runs for 24 seconds we see 8 sucessful requests and 16 failed requests.  This gives 33% success and 66% failure as shown by K6:\n\n\u003cimg width=\"1352\" alt=\"image\" src=\"https://user-images.githubusercontent.com/2636640/200818015-3ad0007b-836e-4b38-a05d-6b4d8007f589.png\"\u003e\n\n## Resources\n[Microsoft Docs | Rate Limiting](https://learn.microsoft.com/en-us/aspnet/core/performance/rate-limit?view=aspnetcore-7.0)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fdotnet-rate-limiting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielmackay%2Fdotnet-rate-limiting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielmackay%2Fdotnet-rate-limiting/lists"}