Pulse a heartbeat to Redis for service discovery, load balancer attachment/detachment (e.g., nginx). Version 1.0.0 (latest stable) dropped metrics support and coffee-script 2, requiring Node >= 6. Low-frequency release; last updated in 2018. Compared to alternatives like 'redis-hb' or custom SETEX loops, this library provides configurable intervals, expiration, Redis time usage, disk space checking, and optional existing client injection.
npm install redis-heartbeatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a heartbeat instance, starts sending periodic pulses to Redis, and stops after 10 seconds.
Ensure Node >= 6.0.0. For metrics, do not upgrade from 0.x.
Pin to version 1.0.0 or avoid unless necessary.
Provide either a full Redis client or host/port/options, not both inadvertently.
Set autostart: false and manually call .start() after attaching error listener.
Set heartbeatExpire to a reasonable value for your use case.
Run 'npm install redis-heartbeat' and ensure Node >= 6.0.0.
Use const Heartbeat = require('redis-heartbeat');Verify import: const Heartbeat = require('redis-heartbeat'); then const hb = new Heartbeat(options);Ensure hb is a valid Heartbeat instance and not quitted.