Skip to content

RateLimitConfig

Defined in: src/core/types.ts:194

Token-bucket rate limit per partition. Every attempt, first attempts and retries alike, takes a token before it is sent, waiting for one when the bucket is empty. Bulkheads cap concurrency; this caps rate. Opt-in: no limit applies unless one is configured.

tokensPerSec: number

Defined in: src/core/types.ts:196

Sustained attempts per second.


optional burst?: number

Defined in: src/core/types.ts:199

Bucket size: attempts that may go out back to back after a quiet spell.

Math.max(1, tokensPerSec) (one second’s worth)


optional maxWaitMs?: number

Defined in: src/core/types.ts:203

Longest an attempt may wait for its token. An attempt that would wait longer fails at once with RateLimitedError. Omit to wait as long as needed, bounded only by cancel() and timeout.totalMs.