wankdanker / node-discover

Automatic and decentralized discovery and monitoring of nodejs instances with built in support for a variable number of master processes, service advertising and channel messaging.
229 stars 59 forks source link

remove a client from the cluster #30

Closed akrv closed 3 years ago

akrv commented 7 years ago

Is it possible to remove a client from a cluster?

Two possibilities that I can think of:

  1. Some one/process/computer undesireable has joined the cluster
  2. The client software does not have the required "code" to listen to a broadcast and "unjoin" the network.

is there a way to get this in node discover? is there a way to go about it? I can develop it. give me some insights

wankdanker commented 3 years ago

I know this is an old question, but you can't really stop a node from receiving messages if you are using broadcast or multicast. However, you could probably add something to its node object when it is discovered to indicate that it is invalid and any code that might reference node objects could check for validity before doing things to that node. Not sure if that makes sense.

akrv commented 3 years ago

Sure reading my own question to remember what I wanted, your reply makes sense to do it that way.

I’ll close the issue as I solved it the same way back then but outside the object and persisted it on disk to share across other processes on the SBC I was using.

wankdanker commented 3 years ago

@akrv Very cool. Glad you figured it out. Thanks for closing the issue.