liveBook · Manning

Distributed system

As explained in Elixir in Action, Third Edition

A distributed system is a system whose components execute across multiple networked machines or runtime environments.

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

Figure 12.1 The to-do system as a cluster
CH12_F01_Juric3

Use the cluster diagram to trace clients, nodes, shared load, and node failure through the to-do system. section 12.0

How Elixir in Action, Third Edition covers it

How deep it goes
Explains processes, messages, replication, joining nodes, and failure boundaries, while deferring complete partition and recovery strategies.
Examples
Demonstrates a replicated to-do service running on two connected nodes and serving requests through separate HTTP endpoints.
What you can do after
Build it from scratch by combining Erlang distribution primitives, explicit message protocols, replication, and failure recovery.
How it connects
Connects processes, message passing, load balancing, database replication, network partitions, and split-brain scenarios.

Also explained in

Compare how 15 books explain distributed system →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.