liveBook · Manning

Restart strategy

A restart strategy specifies how a supervisor handles failed child processes, including which children are terminated and restarted.

How 2 Manning books explain it

Elixir in Action, Third Edition

A restart strategy specifies which supervised child processes a supervisor terminates and restarts after a child failure.

How it is used
Configures how supervisors recover from child termination within a fault-tolerant process system.
How deep it goes
Explains three sibling-restart policies, their dependency trade-offs, and replacement-process semantics.
Examples
Demonstrates Todo.Cache under :one_for_one and relates :rest_for_one to database workers and a registry.
What you can do after
Configure a supervisor with a restart policy matched to the coupling among its child processes.

Read how Elixir in Action, Third Edition explains restart strategy →

Akka in Action, Second Edition

A restart strategy terminates and recreates a failed actor while retaining its actor reference and mailbox for subsequent message processing.

How it is used
Recovers failed actors through supervision while preserving their communication reference and mailbox.
How deep it goes
Explains configuration, lifecycle signals, state loss, failed-message handling, and exponential backoff; defers durable state recovery to persistent actors.
Examples
Uses corrupted LogProcessor input, IndexOutOfBoundException supervision, and external HTTP or database failures to motivate restart choices.
What you can do after
Operate/configure it by wrapping a behavior, selecting exception types, and applying restart or restartWithBackoff.

Read how Akka in Action, Second Edition explains restart strategy →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.