Skip to content

Class RateLimitingSettings

Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll

Describes configuration-driven rate-limiting settings for a Cephalon app.

public sealed class RateLimitingSettings

objectRateLimitingSettings

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

RateLimitingSettings(bool?, string?, int?, int?, int?, int?, IReadOnlyList<RateLimitingOverrideSettings>?)

Section titled “ RateLimitingSettings(bool?, string?, int?, int?, int?, int?, IReadOnlyList<RateLimitingOverrideSettings>?)”

Initializes a new instance of the class.

public RateLimitingSettings(bool? enabled = null, string? algorithm = null, int? permitLimit = null, int? queueLimit = null, int? windowSeconds = null, int? segmentsPerWindow = null, IReadOnlyList<RateLimitingOverrideSettings>? overrides = null)

enabled bool?

Whether rate limiting was explicitly enabled.

algorithm string?

The requested rate-limiting algorithm, such as FixedWindow or TokenBucket.

permitLimit int?

The maximum permits available per limiter window or bucket.

queueLimit int?

The maximum queued requests allowed before rejection.

windowSeconds int?

The limiter window duration in seconds when the selected algorithm uses windows.

segmentsPerWindow int?

The number of segments per window when sliding windows are used.

overrides IReadOnlyList<RateLimitingOverrideSettings>?

The named override policies targeted at specific transports or behaviors.

Gets the requested rate-limiting algorithm, such as FixedWindow or TokenBucket.

public string? Algorithm { get; }

string?

Gets an empty rate-limiting-settings instance.

public static RateLimitingSettings Empty { get; }

RateLimitingSettings

Gets a value indicating whether rate limiting was explicitly enabled.

public bool? Enabled { get; }

bool?

Gets a value indicating whether any rate-limiting settings were explicitly supplied.

public bool HasValues { get; }

bool

Gets the named override policies targeted at specific transports or behaviors.

public IReadOnlyList<RateLimitingOverrideSettings> Overrides { get; }

IReadOnlyList<RateLimitingOverrideSettings>

Gets the maximum permits available per limiter window or bucket.

public int? PermitLimit { get; }

int?

Gets the maximum queued requests allowed before rejection.

public int? QueueLimit { get; }

int?

Gets the number of segments per window when sliding windows are used.

public int? SegmentsPerWindow { get; }

int?

Gets the limiter window duration in seconds when the selected algorithm uses windows.

public int? WindowSeconds { get; }

int?