I'm confused about running node with more than one dyno on Heroku and how to make socket.io/redis accessible across instances. I'm using socket.io 0.9.16.
(1) First, when I scale to two dynos in Heroku, this just means two node instances?
(2) Second, When I create an instance of io like so:
var io = require('socket.io').listen(server);
then when a second node instance gets created then a second io instance gets created with it - is that correct?
(3) And the reason to use redis is to create a single store accessible by all instances - is that correct?
However, when I create a new redisstore for io like so:
var ioRedisStore = require('socket.io/lib/stores/redis');
io.set('store', new ioRedisStore({
redisPub : redis.createClient(),
redisSub : redis.createClient(),
redisClient : redis.createClient()
}));
(4) Isn't this redis instance now created by each node instance and then set as the store for each io instance? How does this cross instances?