This is a module based on the redis-node-client of Fictorial. The module provides sharding by consistent hashing.
Careful: this module is in a very early state of development. Some of the functions are not implemented yet.
After the initialisation it can be used exactly like Fictorials module.
var sharding = sharding = require('./redis-sharding');
var client = sharding.createShard([
{'host' : '192.168.178.38','port' : 6379,'dbindex' : 1},
{'host' : '192.168.178.37','port' : 6379,'dbindex' : 1},
{'host' : '192.168.178.36','port' : 6379,'dbindex' : 1}
]);
client.set('foo', 'bar');
client.dbsize(function(err, value) {
sys.log('SIZE:' + value);
});
client.get('foo', function(err, value){
sys.log(value);
});