Open Jevin23 opened 7 years ago
Either change the port on which node-discover is running:
port-cluster1.js
var Discover = require('node-discover');
var cluster1 = Discover({ port : 12345 });
port-cluster2.js
var Discover = require('node-discover');
var cluster2 = Discover({ port : 54321 });
OR use "encryption keys" :
key-cluster1.js
var Discover = require('node-discover');
var cluster1 = Discover({ port : 12345, key : 'cluster1' });
key-cluster2.js
var Discover = require('node-discover');
var cluster2 = Discover({ port : 12345, key : 'cluster2' });
My preference would be to run them on different ports. Reason being that when using keys on the same port, every node receives all the packets for each cluster, it's just that they can not decrypt the messages.
Hope this helps.
thank you so much. it is it that need. its solution is working.
Maybe have something as cluster ID params?