All tools / Gateway

Gateway heartbeat interval helper

Turn the Hello heartbeat_interval into a jittered heartbeat schedule, a send-budget estimate, and the zombie-connection rule.

heartbeat_interval × jitter

After Hello (op 10), wait heartbeat_interval * jitter with a random jitter between 0 and 1, then send Heartbeat (op 1) every interval. If no Heartbeat ACK (op 11) arrives before the next beat, the connection is zombied: close it with a code other than 1000/1001 and resume. Heartbeats count toward the 120 events per 60 seconds send limit.

Related: Gateway close code explainer · max_concurrency identify bucket calculator