Table of Contents

Namespace Cuemon.AspNetCore.Http.Throttling

Assembly: Cuemon.AspNetCore.dll

Limit HTTP requests in ASP.NET Core using a middleware-based throttling mechanism with configurable quotas and time windows tied to request context (IP address, authorization header, etc.). Use this namespace when you need rate limiting per client or request characteristic. Start with ThrottlingSentinelMiddleware and ThrottlingSentinelOptions to configure quotas and windows. For custom throttling storage, implement IThrottlingCache.

Availability: .NET 10 and .NET 9

Related: Cuemon.Extensions.AspNetCore.Http.Throttling namespace 📘

Classes

MemoryThrottlingCache

Provides a simple in-memory representation of the IThrottlingCache. This class cannot be inherited.

ThrottleQuota

Specifies the allowed quota and window duration of HTTP requests.

ThrottleRequest

Represents the request usage and quota in the context of throttling.

ThrottlingException

The exception that is thrown when a given request threshold has been reached and then throttled.

ThrottlingSentinelMiddleware

Provides an API throttling middleware implementation for ASP.NET Core.

ThrottlingSentinelOptions

Configuration options for ThrottlingSentinelMiddleware.

Interfaces

IThrottlingCache

Specifies the contract for the storage of a throttling cache.