Skip to content
Tracon

TraconRateLimitOptions

Namespace Tracon · Assembly Tracon.Core.dll

Rate-limit settings applied to Tracon endpoints.

public sealed class TraconRateLimitOptions

objectTraconRateLimitOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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.

public TraconRateLimitOptions()

The configuration section name.

public const string SectionName = "Tracon:RateLimit"

string

Whether rate limiting is enabled. Default false.

public bool Enabled { get; set; }

bool

Which key the limit is partitioned by. Default is per tenant.

public RateLimitPartitionKind Partition { get; set; }

RateLimitPartitionKind

The number of requests allowed within a window.

public int PermitLimit { get; set; }

int

The number of requests to queue once the limit is exceeded. If 0, a request gets 429 immediately.

public int QueueLimit { get; set; }

int

The length of the window.

public TimeSpan Window { get; set; }

TimeSpan