In theory, the redis-sentinel package should be perfect. I have 3 socketio servers, each running sentinel and each running redis. the 2nd and 3rd are slaves of the first. This is my setup logic, in coffeescript:
@server = require('http').createServer(@app)
@io = socketio.listen @server
# @io.set 'log level', 0
sentinel = Sentinel {host:'localhost':, port:26379}
clients = {}
clients.write = sentinel.createClient('mymaster', {role:'master'})
clients.pub = sentinel.createClient('mymaster', {role:'master'})
clients.sub = sentinel.createClient('mymaster', {role:'master'})
for key, client of clients
client.on 'error', (e) =>
logError 'realtime redis error', e
@io.set 'store', new socketio.RedisStore
redisClient: clients.write
redisPub: clients.pub
redisSub: clients.sub
I'm using a namespace of /realtime and rooms, so my broadcast looks like @io.of('/realtime').in(room).emit('event', message)
Note that, for any client connected to any server, broadcasts from the server are received fine, and I'm able to write to redis without any issues using this setup, but broadcasts from other servers are not pubsubbed across to the client.
Does anyone see any problems with this or have suggestions?