Erlang / Erlang Basics Interview questions
How does distributed Erlang handle node failures?
Distributed Erlang connects multiple BEAM nodes into a cluster where PIDs, links, and monitors all work transparently across node boundaries — sending to a remote PID looks identical to sending locally. Node health is tracked through a mesh of TCP connections, each node maintaining a heartbeat with the others.
sequenceDiagram
participant A as Node A
participant B as Node B
A->>B: monitor_node(B, true)
Note over A,B: Heartbeat over TCP
B--xA: Connection lost / node down
A->>A: receives {nodedown, 'B@host'}
When a remote node becomes unreachable (crash, network partition, or explicit shutdown), any local process
that called monitor_node/2 on it receives a {nodedown, Node} message, and any
processes linked to PIDs on that node get exit signals just as if those remote processes had crashed locally
— the same link/monitor semantics that work within one node extend across the cluster.
Because Erlang can't distinguish "the remote node crashed" from "the network partitioned," distributed systems built on it still need an explicit strategy (e.g. quorum-based tools, or accepting eventual reconciliation) for split-brain scenarios — the platform gives you the failure notification, not a built-in resolution to network partitions.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
