Skip to content

SupervisorOptions

Defined in: packages/sharding/src/supervisor.ts:2

How a crashed cluster is restarted. The defaults restart every crash after a fixed delay.

optional backoff?: number

Defined in: packages/sharding/src/supervisor.ts:6

Each further crash in the window multiplies the delay by this (default 1: a fixed delay).


optional jitter?: number

Defined in: packages/sharding/src/supervisor.ts:10

Random spread added to each delay, as a fraction of it (0-1, default 0).


optional maxDelay?: number

Defined in: packages/sharding/src/supervisor.ts:8

The longest delay, jitter included (default 5 minutes).


optional maxRestarts?: number

Defined in: packages/sharding/src/supervisor.ts:12

Give up after this many restarts without a stable window between them (default unlimited).


optional restartDelay?: number

Defined in: packages/sharding/src/supervisor.ts:4

Delay before the first restart, in milliseconds (default 5000).


optional window?: number

Defined in: packages/sharding/src/supervisor.ts:14

How long a restarted cluster must run before its earlier crashes are forgiven (default 60,000).