Google News
logo
Erlang - Interview Questions
What Is The Command To Disconnect Node In Erlang?
In Erlang, you can disconnect a node from a cluster using the `erlang:disconnect_node/1` function. The syntax is as follows:
erlang:disconnect_node(Node).​

Here, `Node` is an atom representing the name of the node you want to disconnect from the current node's cluster.

For example, to disconnect from a node named `'othernode@localhost'`, you would use the following command:
erlang:disconnect_node('othernode@localhost').​

Keep in mind that disconnecting a node from a cluster should be done carefully, as it may affect the distributed communication and functionality of the system. It's important to consider the implications and potential consequences before disconnecting nodes in a production environment.
Advertisement