Search⌘ K

Recover the State After a Crash

Understand how to use Elixir's process supervision and ETS tables to recover the last known state after a crash. Learn to save state outside processes, manage ETS table types, and apply privacy options to build fault-tolerant applications.

Fault tolerance

This is where we fulfill the promise of fault tolerance. It’s one thing to restart a process if it crashes and then move on. It’s another thing entirely to restart it and restore the last known good state.

The way we do this is to save a copy of the data outside the current process, or any other process the current one is linked to. We do this when we initialize the process, and then again whenever the state changes.

Whenever we start a new process or ...