liveBook · Manning

Split-brain

As explained in Elixir in Action, Third Edition

Split-brain is a distributed-system condition in which mutually disconnected clusters independently continue serving clients as though they were authoritative.

Split-brain occurs when a network partition divides a cluster into disconnected groups that continue serving clients independently. Each group accepts input without seeing the other, creating conflicting state that may be impossible to reconcile after reconnection. section 12.2.1 section 12.2.5

Typical consequences and signals include:

  • Requests accepted by one cluster remain invisible to the other, producing lost updates or phantom entries. section 12.2.5
  • A peer that stops responding to periodic tick messages is treated as disconnected, although overload or bugs can cause the same symptom. section 12.2.5
  • Processes can receive node-connectivity changes through :net_kernel.monitor_nodes/1. section 12.2.5
$ iex --sname node1@localhost
iex(node1@localhost)1> :net_kernel.monitor_nodes(true)

Start a named Elixir node and enable node-monitor notifications before testing connections and disconnections. section 12.2.5

How Elixir in Action, Third Edition covers it

How deep it goes
Defines the failure mode, consequences, and connection-loss detection, while deferring partition-resolution strategies.
Examples
Demonstrates lost updates, phantom entries, conflicting data, and Elixir nodes reporting nodeup or nodedown events.
What it assumes
Assumes distributed nodes and network connectivity, while defining partitions and split-brain behavior explicitly.
What you can do after
Diagnose partition symptoms with :net_kernel.monitor_nodes/1 and interpret nodeup or nodedown notifications.
How it connects
Connects network partitions with fault tolerance, high availability, node monitoring, and conflicting data.

Also explained in

Compare how 3 books explain split-brain →

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.