Registry / database / redis-party

redis-party

JSON →
library0.6.0jsnpmunverified

Drop-in Redis cluster client wrapper for Node.js that provides a node_redis-compatible interface. Version 0.6.0 is the current stable release. The library automatically discovers cluster nodes, manages slot-node mapping, and routes commands to the correct node based on key hashes. It supports multi-key operations only on the same slot and emits events for cluster configuration changes. Alternative to ioredis for cluster mode, but with lower maintenance activity.

npm install redis-party
INSTALL
IMPORT
SIG · REDIS-PARTY
R
redis-party
databasejavascriptv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Cluster
import { Cluster } from 'redis-party'
const { Cluster } = require('redis-party')
ESM and CommonJS both supported; named export for Cluster class.
createClient
import { createClient } from 'redis-party'
const redis = require('redis-party'); redis.createClient(...)
Also available as cluster.createClient; the default export is the module itself.
redis-party
import redis from 'redis-party'
const redis = require('redis-party').default
Default import gives the whole module with Cluster, createClient, etc.

Creates a Redis cluster instance, connects to nodes, sets a key, and quits.

import { Cluster } from 'redis-party'; const nodes = [ { host: '127.0.0.1', port: 7000 }, { host: '127.0.0.1', port: 7001 }, { host: '127.0.0.1', port: 7002 } ]; const cluster = new Cluster(nodes, { max_attempts: 5 }); cluster.on('ready', () => { cluster.set('hello', 'world', (err, res) => { if (err) console.error(err); else console.log(res); cluster.quit(); }); }); cluster.on('error', (err) => console.error(err));
Debug
Known issues
gotchaMulti commands must operate on the same slot, otherwise an error is thrown.
fix
Ensure all keys in a multi command hash to the same slot (e.g., use hash tags).
affects: >=0.1.0
deprecatedThe library is in maintenance mode and not actively developed. New features are unlikely.
fix
Consider migrating to ioredis which is actively maintained.
affects: >=0.6.0
gotchaThe library depends on the older node_redis package (v0.12.x) which has known issues and is deprecated.
fix
Avoid using newer Redis features or upgrade to a more modern client.
affects: >=0.1.0
Errors
Common errors & fixes
Multi commands must operate on the same slot!
Using multi with keys that hash to different slots in a Redis cluster.
fix
Use hash tags to ensure all keys are on the same slot: `{user:1000}.name` and `{user:1000}.age`.
Error: Redis connection to 127.0.0.1:7000 failed - connect ECONNREFUSED
Redis cluster nodes are not running or not reachable.
fix
Start your Redis cluster nodes before running the client, or check firewall and port settings.
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
redisrequiredredis-party wraps the node_redis library (hiredis or redis) for cluster connections.
Agent activity
21 hits · last 30 days
node
18
Meta
1
Amazon
1
Resources
redis-party — npm install redis-party · libregistry