Skip to content

ClusterHealth

Defined in: packages/sharding/src/health.ts:68

Health of one cluster.

host: string

Defined in: packages/sharding/src/health.ts:73

Where it runs: "local" or the ID of a host.


id: number

Defined in: packages/sharding/src/health.ts:69


optional lastReadyAt?: number

Defined in: packages/sharding/src/health.ts:84

When any process of this cluster last reported ready.


optional metrics?: WorkerMetrics

Defined in: packages/sharding/src/health.ts:88

Present when requested with refreshHealth({ metrics: true }) and the worker answered.


optional pid?: number

Defined in: packages/sharding/src/health.ts:71


optional readyAt?: number

Defined in: packages/sharding/src/health.ts:82

When the current process reported ready.


optional reportedAt?: number

Defined in: packages/sharding/src/health.ts:90

When shards and metrics were reported (epoch ms).


restarts: number

Defined in: packages/sharding/src/health.ts:79

How many times it has been restarted after a crash.


shardIds: number[]

Defined in: packages/sharding/src/health.ts:75

Shards this cluster owns right now.


shards: ShardHealth[]

Defined in: packages/sharding/src/health.ts:86

Per-shard health from the worker’s last report. Empty until it reports.


optional startedAt?: number

Defined in: packages/sharding/src/health.ts:80


state: ClusterState

Defined in: packages/sharding/src/health.ts:70


uptimeMs: number

Defined in: packages/sharding/src/health.ts:77

Milliseconds since this process was forked; 0 when it is not running.