Class: HeartbeatConfig

ShardingMaster.ShardMasterConfig. HeartbeatConfig


new HeartbeatConfig()

Configuration for the Shard Master. This config will be updated during runtime if it is edited. Relevant settings may be sent to each shard during each initial setup. These settings are related to heartbeat and uptime management. This is included in ShardMasterConfig. This interval is also used to update shard configuration if necessary.
Source:

Members


assumeDeadAfter :number

The timeout after the master does not receive an update from the shard to assume the shard has died, and we can begin recovery procedueres (milliseconds).
Type:
  • number
Source:

disperse :boolean

If relevant, should we attempt to disperse the heartbeat requests throughout the interval such that not all requests are made at the same time. This could cause statistics to not line up or be inconsistent.
Type:
  • boolean
Default Value:
  • true
Source:

expectRebootAfter :number

The timeout after the shard does not receive an update from the master to reboot. This is the threshold that once crossed, the master assumes the shard is rebooting or has otherwise lost connection, and stops sending reboot requests. The shard is not considered completely dead yet, and will not be replaced until after the assumeDeadAfter timeout.
Type:
  • number
Source:

historyLength :number

How far back to store shard status data for analysis (milliseconds).
Type:
  • number
Default Value:
  • 1 Day
Source:

interval :number

If relevant, this is the expected interval at which to send/receive updates about an individual shard's status in milliseconds.
Type:
  • number
Source:

requestRebootAfter :number

The timeout after not receiving a heartbeat from a shard to request that it reboots, in milliseconds.
Type:
  • number
Source:

updateStyle :string

The method used to update shard status. "pull" specifies that the master will attempt to pull the information from the shards at the configured interval. "push" specifies that the shards are expected to push their status to the master at the specified interval. "event" would only send updates from either side if one believes a state to have changed.
Type:
  • string
Default Value:
  • pull
Source:

useMessageStats :boolean

If statistics about messages received from Discord should be used in the evaluation of a shard's alive state. This means, that if no messages are received from Discord between heartbeats, we can assume the shard is dead. This may not be feasible on smaller bots.
Type:
  • boolean
Source: