Restart strategy
A restart strategy specifies how a supervisor handles failed child processes, including which children are terminated and restarted.
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
- resumecontrasts with · Resume is an error-handling strategy that allows processing to continue after an unexpected error, typically by skipping the failing operation or element.
- actor referenceuses · An actor reference is an addressable handle through which other actors or systems send messages to an actor.
- Behaviors.failedconfigures · Behaviors.failed is an Akka Typed factory for a failed actor behavior that stops message processing until the actor is restarted or terminated.
- one_for_one strategyincludes · A one-for-one strategy directs a supervisor to start one replacement child when a child terminates.
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.

