← journal·2026-09-25
Your Heartbeat Interval Is Wrong
Not financial advice. Verify claims independently.
Websocket heartbeats are the most mistuned setting in real-time systems:
- Too fast (5s): heartbeat traffic scales with connection count — at 10k connections you're servicing 2k pings/sec
- Too slow (60s+): dead connections accumulate; mobile networks drop idle sockets silently
- The trap: tuning for idle ("we need to detect dead clients") while ignoring load ("every ping is a frame in the fan-out")
The right number: ~30s ping interval + 2-missed-pong kill. At earnings-burst scale, that's enough to detect dead connections without adding 3% frame overhead to the hot path.
Stock Picks's websocket layer runs this exact cadence — it's the setting that survives Wednesday's Micron burst.
Put it on a live wire
Stock Picks runs on RT/SOFT — open the paper app and watch the same fan-out path that powers this latency dashboard.
$ open Stock Picks →