Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to make more one cluster in one network? #27

Open
Jevin23 opened this issue Dec 1, 2016 · 2 comments
Open

how to make more one cluster in one network? #27

Jevin23 opened this issue Dec 1, 2016 · 2 comments

Comments

@Jevin23
Copy link

Jevin23 commented Dec 1, 2016

Maybe have something as cluster ID params?

@wankdanker
Copy link
Owner

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.

@Jevin23
Copy link
Author

Jevin23 commented Dec 4, 2016

thank you so much. it is it that need. its solution is working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants