0

Is it proper to deploy an app with socketcluster instead of socket.io on strongloop PM, considering the fact that both socketcluster and strongloop have cluster facilities?

Roy Falk
  • 1,685
  • 3
  • 19
  • 45

1 Answers1

0

Under the hood strong-pm is using strong-supervisor for process control, which uses the cluster feature provided by Node core.

The docs for SocketCluster don't make it immediately obvious, but the socketcluster code pretty clearly shows that it uses cluster.

The docs for cluster specifically say that cluster.fork() can only be called from the cluster master. Since strong-supervisor works by only running the application in cluster worker processes, the socketcluster framework won't be able to launch workers.

TL;DR: no, socketcluster and strong-pm are not compatible because they are using the same clustering feature.

Ryann Graham
  • 8,079
  • 2
  • 29
  • 32