ioredis-pool
v1.0.2
Published
A node.js connection pool for ioredis.
Downloads
165
Readme
ioredis-pool
A node.js connection pool for ioredis.
Features
Select node by name
Installation
npm install ioredis-pool
Quick start
var RedisCluster = require('ioredis-pool');
var redis = new RedisCluster([
{name: 'localhost', host: 'localhost', port: 6379},
{name: 'localhost2', host: 'localhost', port: 6380}
]);
var node1 = redis.selectNode('localhost');
node1.set('foo', 'bar');
node1.get('foo', function(err, result) {
console.log(result);
});