Table of Contents

Class MassiveRateLimitOptions

Namespace
MassiveDotNet
Assembly
MassiveDotNet.dll

Configures the SDK's client-side throttle. Assign an instance to RateLimit to enable it; throttling is off while that property is null.

public sealed class MassiveRateLimitOptions
Inheritance
MassiveRateLimitOptions
Inherited Members

Remarks

The throttle is opt-in because the SDK cannot know a caller's entitlement. A default tuned for the free tier's five requests a minute would throttle a paid key to a fraction of its allowance, and any other default would 429 the callers it was meant to protect.

Permits refill continuously rather than all at once on a window boundary, so a burst up to PermitsPerWindow is allowed immediately and the requests after it are paced. A fixed window would let a burst at the end of one window and another at the start of the next land inside a single window on the server's own clock, which no client can observe.

Properties

PermitsPerWindow

How many requests are permitted per Window. Defaults to 5, the free tier's allowance; set it to match your own tier, which the SDK has no way to discover.

public int PermitsPerWindow { get; set; }

Property Value

int

QueueLimit

How many requests may wait for a permit before further ones are rejected outright. Defaults to MaxValue, so a caller who enables throttling waits rather than fails.

public int QueueLimit { get; set; }

Property Value

int

Remarks

Unbounded queueing is safe here in a way it would not be in a server: only requests the caller has actually issued can queue, so the depth is bounded by their own concurrency. Set it to 0 to fail fast instead — a rejected request throws MassiveRateLimitExceededException without reaching the network.

Window

The period PermitsPerWindow is measured over. Defaults to one minute, which is how the platform states its own limits.

public Duration Window { get; set; }

Property Value

Duration