I want to use node.js and sockets.io in my share point 2013 environment, which has 2 web front ends and 1 app front end.

The problem I am wondering, is that I know I need to install node.js on both the web front ends, and then the load balancer redirects users to one of the two web front ends. But any data I store for a user in node.js is stored in the web front end they visited.

So whats the best approach to synchronize the data between the two web front ends if I say want to broadcast to all users from 1 web front end? Cause some sockets are in 1 web front end, and some are in the other.

I was thinking, of making when 1 webfront end wants to broadcast to all users, they broadcast to all the sockets in that that web front end, then send a message to the other web front end, and then that finishes the job by sending it to all its sockets.

Is this a good approach?

  • Your question is not really related to SharePoint and would have a much broader reach if it was moved to StackOverflow. Oct 30, 2015 at 22:16
  • It is in the grey area, but I'm not sure if SO is the right place either. ServerFault could be an option. But since it has a good answer here I think it would be better not to move the question.
    – Benny Skogberg
    Oct 31, 2015 at 4:48

1 Answer 1


This doesn't sound SharePoint specific, however that said I think you should consider this problem in the same category as something like session state in a similar configuration.

You need to store that data somewhere that all frontends running your app can get to. That could be a DB for example. OR a shared cache like Redis. You can then use something like Redis queue to send messages to the other instances of your app so they can broadcast to their users perhaps.

Like i said, not really anything SharePoint specific in this question and something you should ask on StackOverflow directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.