Definition
Assembly: Microsoft.OData.Mcp.Core.dll Namespace: Microsoft.OData.Mcp.Core.Configuration Inheritance: System.ObjectSyntax
Summary
Configuration for request rate limiting and throttling.Remarks
Rate limiting configuration controls how many requests clients can make within specific time windows. This helps protect the server from abuse, denial-of-service attacks, and ensures fair resource usage across clients.Constructors
.ctor
Syntax
.ctor Inherited
Inherited from
objectSyntax
Properties
BurstLimit
Gets or sets the burst limit for requests.Syntax
Property Value
Type:int
The maximum number of requests allowed in a short burst.
Remarks
The burst limit allows clients to exceed the sustained rate temporarily, accommodating normal traffic spikes while still preventing abuse.RequestsPerMinute
Gets or sets the maximum number of requests allowed per minute.Syntax
Property Value
Type:int
The maximum requests per minute per client.
Remarks
This sets the sustained rate limit for clients. Requests exceeding this rate will be throttled or rejected based on the rate limiting policy.TimeWindow
Gets or sets the time window for rate limit calculations.Syntax
Property Value
Type:System.TimeSpan
The time window over which requests are counted.
Remarks
The time window defines the period over which the rate limit is enforced. Shorter windows provide more responsive protection but may be more sensitive to normal traffic variations.Methods
Clone
Creates a copy of this rate limiting configuration.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.RateLimitingConfiguration
A new instance with the same settings.
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
obj | object? | - |
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ForProduction
Creates a rate limiting configuration optimized for production environments.Syntax
Returns
Type:Microsoft.OData.Mcp.Core.Configuration.RateLimitingConfiguration
A rate limiting configuration suitable for production use.
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
MergeWith
Merges another rate limiting configuration into this one.Syntax
Parameters
| Name | Type | Description |
|---|---|---|
other | Microsoft.OData.Mcp.Core.Configuration.RateLimitingConfiguration | The configuration to merge into this one. |
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
| Name | Type | Description |
|---|---|---|
objA | object? | - |
objB | object? | - |
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?
Validate
Validates the rate limiting configuration.Syntax
Returns
Type:System.Collections.Generic.IEnumerable<string>
A collection of validation errors, or empty if the configuration is valid.