socketstream/socketstream

load balancing of pub/sub no working as expected

Open

#429 aberto em 29 de jan. de 2014

Ver no GitHub
 (24 comments) (0 reactions) (0 assignees)JavaScript (3.557 stars) (302 forks)batch import
BugCrucial RequirementTests Neededhelp wanted

Description

Hello!

in the docs (https://github.com/socketstream/socketstream/blob/master/doc/guide/en/pub_sub_events.md#event-transports) I read

"The SocketStream Pub/Sub system has been designed from the ground up with horizontal scalability and high-throughput in mind. The all and channel commands will be automatically load-balanced across all SocketStream servers when an external event transport is used.

This sounds great, but I am experiencing very unexpected results when I let two node instances run on the same server sharing the redis transport. I in fact end up with a scenario where each nodejs server sends all channel messages to all connected clients. I thought the idea was that each nodejs server only sends messages to the sessions it is responsible for. Please point me to where I am doing things wrongly...

Here is the the part where I tell my node app to use the redis transport:

ss.session.store.use( 'redis', scope.serverConf.redis_ss );
ss.publish.transport.use('redis', scope.serverConf.redis_ss);   

scope.serverConf.redis_ss is something like:

redis_ss : {
    host: 'localhost',
    port: 6379,
    db: 4
},

Guia do colaborador