Redis WS Discovery (v0.2.0) enables WebSocket servers and clients to discover each other via Redis pub/sub without a central registry. Each server announces its identity (e.g., host, port) to a Redis channel, and clients (or other servers) listen for announcements to build a live list of available peers. Built on ioredis (^5.4.1), shipped with TypeScript definitions, requires Node >=20. Lightweight alternative to etcd or Consul for WebSocket topologies in Redis-heavy stacks. Released under new BSD license.
npm install redis-ws-discoveryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic server discovery registration and client discovery listening via Redis pub/sub.
Ensure all instances use the same Redis connection and channel string.
Upgrade Node.js to v20+ or use an earlier version of the package if available.
Install ioredis@^5.4.1 as a dependency.
Include a 'url' property in the identity object passed to WsDiscoveryServer.
Configure ttl in options to control re-announcement frequency.
Manually fetch active servers after client start using a separate mechanism if needed.
Optionally implement a manual removal via Redis client before stopping the server.
npm install ioredis@^5.4.1
Install ioredis and use it as the Redis client
Use import syntax or enable ESM in your project
Set a valid channel string in options
Add 'url' property to the identity object passed to WsDiscoveryServer