Skip to content

ClusterSettings

Defined in: src/cluster/Cluster.ts:53

readonly optional downing?: DowningProvider

Defined in: src/cluster/Cluster.ts:109

Optional split-brain resolver. When provided, the cluster invokes provider.decide(view) whenever a member transitions to / from unreachable, and force-downs every address in the returned set (regardless of failure-detector state). Without a provider, the cluster relies solely on the failure detector’s elapsed-time unreachable → down → removed cascade — fine for unilateral crashes, weak under network partitions.

See src/cluster/downing/ for the bundled strategies (KeepMajority, KeepOldest, KeepReferee, StaticQuorum, LeaseMajority).


readonly optional failureDetector?: Partial<FailureDetectorSettings>

Defined in: src/cluster/Cluster.ts:61

Failure detector thresholds.


readonly optional gossipIntervalMs?: number

Defined in: src/cluster/Cluster.ts:65

How often gossip is pushed to a random reachable peer.


readonly host: string

Defined in: src/cluster/Cluster.ts:54


readonly port: number

Defined in: src/cluster/Cluster.ts:55


readonly optional roles?: string[]

Defined in: src/cluster/Cluster.ts:59

Role tags exposed to other members — used to constrain sharding placement.


readonly optional seedRetryIntervalMs?: number

Defined in: src/cluster/Cluster.ts:67

How often to resend the initial join gossip to seeds until self is Up.


readonly optional seeds?: string[]

Defined in: src/cluster/Cluster.ts:57

Other nodes this node should try to contact on startup.


readonly optional tombstoneMinRetentionMs?: number

Defined in: src/cluster/Cluster.ts:90

Minimum age before a tombstone is eligible for pruning, regardless of tombstoneTtlMs. Defaults to 6 × downAfterMs, which gives a few failure-detector rounds of breathing room so peers that haven’t fully converged still see the tombstone before it vanishes. Mostly relevant for tests that set a very low TTL.


readonly optional tombstonePruneIntervalMs?: number

Defined in: src/cluster/Cluster.ts:82

How often the tombstone-prune pass runs. Default 5 min — small enough that a freshly-expired tombstone disappears within one pruning window, large enough to be negligible CPU.


readonly optional tombstoneTtlMs?: number

Defined in: src/cluster/Cluster.ts:76

How long to keep a removed tombstone in the local members map before pruning it. Tombstones exist so stale gossip from a slow peer can’t resurrect a definitively-removed address; the TTL caps their accumulation in long-running clusters with frequent node churn (#75). Default 24 h — comfortably above any realistic gossip-propagation lag.


readonly optional transport?: Transport

Defined in: src/cluster/Cluster.ts:63

Override the transport (e.g. InMemoryTransport for tests).


readonly optional weaklyUpAfterMs?: number

Defined in: src/cluster/Cluster.ts:96

Auto-promote a joining member to weakly-up after this many ms if convergence (leader + up transition) hasn’t happened yet. Set to 0 to disable. Default: 0 (disabled — opt-in only).