1.1.1 • Published 8 years ago

wsc-redis v1.1.1

Weekly downloads
6
License
MIT
Repository
github
Last release
8 years ago

wsc-redis

A redis broker for ws-cluster. It allows you to scale ws-cluster horizontally across multiple machines.

Installation

$ npm install wsc-redis --save

Usage

var wsc = require('ws-cluster');
var Broker = require('wsc-redis');

var server = wsc.createServer({
	broker: new Broker(6379, 'localhost')
});

API

new Broker()

Return a redis broker instance. new Broker() accepts these arguments:

  • redis.createClient([options])
  • redis.createClient(unix_socket[, options])
  • redis.createClient(redis_url[, options])
  • redis.createClient(port[, host][, options])

The arguments will be passed to redis.createClient().