Add configurable `heartbeat_interval`

Defaults to 30 seconds.