and redis store

Showing 1-5 of 5 messages and redis store anlam 4/13/12 7:50 PM

There are a couple of things that I couldn't understand. If you can
clarify these, I'll really appreciate it.

We can use redis in two ways.

- First, we can use it as a storage so whenever we spawn a new
process, we can attach the new process to it and socket
states can be shared.

- Second, we can also use it for pub sub. So redis can also handle pub

Have I understood correctly? If so, does redis emit messages to the
clients? Does it mean that the heavy job will be on redis if we use
pub sub as well? (which means we'll be mainly scaling redis if we are
sending lots of messages). So, if I am broadcasting a message to 100
people, will send the message to redis and than redis will
send to 100 people? If all these correct, does it mean I should expect
a better performance when using pub sub as well? If not, why should I
use pub sub? What is the use case?

I may have understood completely wrong too, I am a bit confused.

Thanks in advance,

Re: and redis store dshaw 4/18/12 9:34 AM
RedisStore provides light-weight persistance and uses Redis pub/sub
*internally* to keep processes in sync. You still interface
with's built in pub/sub mechanisms like namespaces and

Daniel Shaw

Re: and redis store artem 5/14/12 11:50 AM
Hi Daniel,

Will this work with xhr-polling transport?  I am using RedisStore to store connection information between two node processes, it is working and connections persist between the processes.  Using this example  However,  I cant broadcast data between the two node processes.  Do I have to manually write up pub/sub if using xhr-polling?  We are on heroku, scaling to multiple dynos.

Re: and redis store dshaw 5/14/12 12:31 PM

Hopefully, 0.9.7 will come out soon, but for RedisStore and XHR you
need to use HEAD to pick up #848
( from Mike Brevoort.

You can do this in your package.json:

  "dependencies": {
    "" : ""

I recommend bumping back to the release version as soon as it comes
out though. This is a server-side only patch, so you don't need to
worry about

Daniel Shaw
Re: and redis store artem 5/14/12 1:49 PM
Hi Dan,

Thanks for the quick reply.  I applied the #848 patch but it did not fix the issue.  Just to be clear, my issue is that clients on multiple node processes do not receive broadcasts if I am using xhr-polling.  For example,  I have 2 node processes, A and B.  If I have clients on A and B,  they cant broadcast to each other.  The same thing happens if a client originally connected to A and got switched to B.  So the clients receive messages only if they are on the same node process.  Is this normal behavior with xhr-polling transport, or should all node processes be receiving broadcasts?