A distributed system runs components across networked machines or runtime environments. Clustering improves availability by letting surviving nodes continue service after failures, and improves scalability by adding nodes as demand grows. Clients use a stable endpoint while internal nodes share the load. section 12.0
Elixir and Erlang build distribution from processes and messages. A message can target a process in the same BEAM instance or on another machine, but delivery and outcome are not guaranteed by default. Stronger guarantees require an explicit response protocol, while copied message contents can influence communication design. section 12.0
Production systems must address several operational boundaries:
- Provide a load balancer as the single client access point. section 12.2.4
- Synchronize a joining node before allowing it to serve requests. section 12.2.4
- Design recovery for fragile replication, network partitions, and split-brain scenarios rather than expecting Erlang to resolve them automatically. section 12.2.4
Two-node to-do cluster
Run the same to-do system as node1 and node2, connect the nodes, and issue requests against either HTTP endpoint. Entries added through one node become visible through the other after replication, demonstrating shared service across a cluster. section 12.2.4
Use the cluster diagram to trace clients, nodes, shared load, and node failure through the to-do system. section 12.0














