Skip to content

KeyedRateLimitOptions

Record in Oadm.Sdk.Network · Oadm.Sdk.dll

Limits of KeyedRateLimiter<TKey>.

public sealed record KeyedRateLimitOptions
int Burst { get; init; }

Requests a client may send back to back.

int GlobalPerSecond { get; init; }

Requests per second over all clients; beyond that everything is dropped.

TimeSpan IdleExpiry { get; init; }

Clients not seen for this long are forgotten.

int MaxClients { get; init; }

Most clients tracked; the least recently seen one is forgotten first.

IReadOnlyList<TimeSpan> NoticeIntervals { get; init; }

Per-client notices while the client is over its limit, each at most once per its interval (e.g. NTP: one Kiss-o’-Death per minute, one log entry per minute). Up to 8.

double RefillSeconds { get; init; }

One request token is added every this many seconds.