Skip to main content

RateLimitOptions

Upgather SDK


Upgather SDK / RateLimitOptions

Interface: RateLimitOptions

Configuration options for rate limiting.

Extended by​

Properties​

burstCapacity?​

optional burstCapacity: number

Burst capacity (default: same as requestsPerSecond)


endpointKeyExtractor()?​

optional endpointKeyExtractor: (request) => string

Function to extract endpoint key

Parameters​

request​

HttpRequest

Returns​

string


logger?​

optional logger: LoggerInterface

Optional logger instance for rate limit events


maxWaitTime?​

optional maxWaitTime: number

Maximum wait time in ms (default: 5000)


namespace?​

optional namespace: string

Namespace for isolation between different parts of app


requestsPerSecond​

requestsPerSecond: number

Maximum requests per second


waitWhenLimited?​

optional waitWhenLimited: boolean

Whether to wait when rate limited (vs reject)