Dev builds per-client rate limiter in ASP.NET Core using identity-based partitions
A developer has shared a hands-on lab demonstrating how to implement per-client rate limiting in ASP.NET Core by keying partitions on individual caller identities. The setup uses a custom header authentication scheme to validate clients and issue a client_id claim, which downstream policies use to assign each client its own request bucket. Read and write budgets are tracked separately per client using a fixed-window policy allowing 10 requests per 10 seconds with no queuing. Any request beyond the limit within that window receives an HTTP 429 response immediately. The lab code, including in-memory client fixtures and protected endpoints, has been published on GitHub.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in