I want to create a cluster of node.js server in order to support high concurrency, for a chat rooms application. I need to be able to share information between all nodes. I am trying to find out what would be the best way to keep all the servers in-sync. I want as much flexibility as possible in the shared object, as I plan to add more features in the future.
So far, I have 2 solutions in mind:
- Subscribe to NoSQL key (for example redis publish-subscribe)
- Nodes update each other using sockets.
Which is better? Any other ideas?