StorageBackendLoadSignal
Implements
Index
Constructors
constructor
Parameters
options: StorageBackendLoadSignalOptions = {}
Returns StorageBackendLoadSignal
Properties
readonlyname
This signal's key in the reported SystemInfo, also used in logging — so it must be unique among the
signals of one ConcurrencySystem, which throws on a duplicate. The four built-in names (memInfo,
eventLoopInfo, cpuInfo, storageBackendInfo) land in the correspondingly named SystemInfo fields rather
than the loadSignalInfo bag; taking one over means switching that built-in off.
readonlyoverloadedRatio
Maximum ratio of overloaded snapshots in a sample before the signal
is considered overloaded. For example, 0.2 means the signal fires
when more than 20% of the sample window is overloaded.
Methods
getSample
Return snapshots for a recent time window (used for "current" status).
Parameters
optionalsampleDurationMillis: number
How far back to look, in milliseconds.
Returns LoadSnapshot[]
start
Start collecting snapshots, retaining at least the sample window named in the
context. Called when the ConcurrencySystem starts — which may be a restart, so drop anything measured before it.Parameters
context: LoadSignalStartContext
Returns Promise<void>
stop
Stop collecting snapshots. Called when the ConcurrencySystem shuts down.
Returns Promise<void>
Periodically checks the storage backend for rate-limit errors (HTTP 429) and reports overload when the error delta exceeds a threshold.
Built by default; construct one yourself only to wrap or adapt it — see LoadSignal.
Switch it off entirely (
storageBackend: false) if the storage backend reports no rate-limit statistics, since it otherwise polls it every second to no purpose.