sdelements/lets-chat

Not scalable using replica set

Opened this issue · 1 comments

When using a MongoDB replica set and having two different node instances of lets-chat connect to the replica set, you can't see each others messages util you actively reload the page. This is because the current implementation assumes, that all clients are connected to one node instance and the websockets only push new information to the client if some change occurred on the same node instance. It should also check if there are new messages in the database from time to time. Otherwise the application is not really scalable.

You could try adding the redis socket.io adapter to the server, that should let you run multiple instances.

We're working on a little something behind the scenes that should address this issue and a bunch more ;)