Hacker News new | ask | show | jobs
by nissimk 3741 days ago
How does the realtime work when there are multiple node processes or servers? If my client is connected to server A and an update occurs on server B, will my client get the event on the web socket? If so, how does server A know about the event that occurred on server B?
1 comments

To handle the real-time event syncing we created https://github.com/feathersjs/feathers-sync. It uses a central Redis DB or a MongoDB tailable collection to to synchronize service events between different application instances. Another option is to use your websocket libraries' clustering library, for Socket.io for example there is https://github.com/socketio/socket.io-redis.

This is a very good question. We're definitely planning on adding a section about performance and scaling to the documentation very soon.

I'll quickly add to what daffl said. That there is one more manual method outline here (https://github.com/feathersjs/feathers/issues/265#issuecomme...) that doesn't require running another non-feathers server.