Distributed nodes detect failed peers through periodic tick messages. Node.monitor/2 lets a process receive notifications when a particular remote node connects or disconnects, but does not reconnect it automatically. section 12.1.1 section 12.2.5
Choose the monitoring scope that matches the operational need:
- Monitor one remote node with Node.monitor/2 when only a specific peer matters. section 12.2.5
- Monitor all node connections and disconnections with :net_kernel.monitor_nodes/1. section 12.1.1 section 12.2.5
- Treat remote-process monitoring separately: a crashed process or disconnected node produces a monitor message, whereas a link produces an exit signal. section 12.2.5
