How to automatically join nodes in an erlang riak core application?

169 Views Asked by At

I am trying to setup a simple distributed application using erlang riak core framework. I read the documentation and it says I have to manually join the nodes via riak admin commands. I wanted to know what would happen if the entire cluster goes down.Do i need to have logic in my code to do a join on nodes every time cluster starts up or if there is a way to enlist all the nodes in a config?

1

There are 1 best solutions below

0
On BEST ANSWER

When the nodes restart, they try to reconnect automatically, because when you joined some nodes with the command

riak_core:join("[email protected]")

the data is saved locally to the node. If you want remove a node from cluster you should call

riak_core:leave()