.NET API
TraconRateLimitOptions
Tracon.Core.dllRate-limit settings applied to Tracon endpoints.
public sealed class TraconRateLimitOptionsInheritance
Section titled “Inheritance”object ← TraconRateLimitOptions
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 Tracon: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 TraconQuotaOptions and counted in the database.
The counter lives in the memory of a single process: Tracon ships no distributed rate limiter. In a multi-instance deployment the limit therefore applies per instance — two instances with a TraconRateLimitOptions.PermitLimit of 100 together admit 200 requests per window, and RateLimitPartitionKind.Tenant partitions that per-instance window per tenant rather than across the deployment. InboundTriggerRateLimiter has the same scope. A ceiling that must hold for the deployment as a whole is a total-consumption question, so it belongs to TraconQuotaOptions.
Constructors
Section titled “Constructors”TraconRateLimitOptions()
Section titled “ TraconRateLimitOptions()”public TraconRateLimitOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”The configuration section name.
public const string SectionName = "Tracon: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; }