Q:

nodejs cluster messaging vs websockets

I am developing an app with nodeJS and cluster with multiple workers with different port on each worker, I may need to make the workers communicate each other, I know that nodeJS cluster has built in support for messaging between master and other workers.
I have 3 questions regarding this.
1 . can I send the message between workers without master to be in the middle, for faster process ? 

Is it good idea to open a websocket on each worker to listen from other workers to replace the built in messaging in cluster, is it faster ?
if the app would scale to multiple servers I think websocket would be the answer, any alternatives please suggest ?

A:

No. Generally child processes are not aware of each other. They are only aware of the parent.
It is not faster, it is definitely slower. It might be better though since you won't be able to scale onto multiple machines otherwise (cluster only creates subprocesses). Depending on your needs.
Try zeromq for example (I'm sure there is a binding for NodeJS, google it). Or a dedicated message broker (like RabbitMQ). These were created to solve that particular problem of yours unlike websockets.

