AgentPrismRateLimitOptions
AgentPrism.Core.dllRate-limit settings applied to AgentPrism endpoints.
public sealed class AgentPrismRateLimitOptionsInheritance
Section titled “Inheritance”object ← AgentPrismRateLimitOptions
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Read from the AgentPrism:RateLimit configuration section.
Off by default. It has no way of knowing a
library consumer’s traffic; a default that comes on would silently answer an
upgrading setup’s live traffic with 429. Recommended values are documented in the README.
Rate limiting is not a quota: it smooths out sudden load at the second/minute scale and lives in memory. Total-consumption limiting at the day/month scale is done with AgentPrismQuotaOptions and counted in the database.
Constructors
Section titled “Constructors”AgentPrismRateLimitOptions()
Section titled “ AgentPrismRateLimitOptions()”public AgentPrismRateLimitOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "AgentPrism:RateLimit"Field Value
Section titled “Field Value”Properties
Section titled “Properties”Enabled
Section titled “ Enabled”Whether rate limiting is enabled. Default false.
public bool Enabled { get; set; }Property Value
Section titled “Property Value”Partition
Section titled “ Partition”Which key the limit is partitioned by. Default is per tenant.
public RateLimitPartitionKind Partition { get; set; }Property Value
Section titled “Property Value”PermitLimit
Section titled “ PermitLimit”The number of requests allowed within a window.
public int PermitLimit { get; set; }Property Value
Section titled “Property Value”QueueLimit
Section titled “ QueueLimit”The number of requests to queue once the limit is exceeded. If 0,
a request gets 429 immediately.
public int QueueLimit { get; set; }Property Value
Section titled “Property Value”Window
Section titled “ Window”The length of the window.
public TimeSpan Window { get; set; }