Skip to content

ranzwertig/redis-node-sharding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

redis-node-sharding

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.

How to use this

After the initialisation it can be used exactly like Fictorials module.

Example


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);
});

Author

Christian Ranz - twitter - blog

About

A redis client which implements sharding by consistent hashing based on http://http://github.com/fictorial/redis-node-client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published