0

I have four nodes which are acting as a redundancy quartet of nodes. My client connects to a node named "currentnode". Is it possible that the four nodes can periodically change their name to "currentnode" to allow the client to connect to each of the four nodes, without realising it is a different node?

Lethi
  • 1,167
  • 1
  • 10
  • 16

1 Answers1

3

I guess you could do such a thing, cyclic re-registering the processes under a common name.

However, I would strongly advise you not to do that kind of thing, it strikes me as a terrible hack. Just think about what happens when you send a message to that node and then the shift occurs.

You should rather create a proxy process that distributes the requests to your workers. That way, the clients do not have to know who exactly they're talking to and you can also implement more fine-grain scheduling mechanisms, for example round-robin.

jupp0r
  • 4,502
  • 1
  • 27
  • 34
  • So create an intermediary process which contains the control logic and the client connects to that, essentially? – Lethi Feb 27 '12 at 21:53
  • Yes, that's a much better architecture imho. – jupp0r Feb 27 '12 at 21:55
  • Also once you distributed the task your workers can communicate directly with the clients, there is no need to pass through the proxy. – rvirding Feb 27 '12 at 22:00
  • The other day I saw this one http://weblambdazero.blogspot.com/2008/08/web-services-need-balance.html – NorbertK Feb 28 '12 at 07:26