Back to Delivery Models

Architecture Deep Dive

Fault Tolerance by Design.

In Elixir, we don't just try to prevent errors—we design systems that know exactly what to do when errors inevitably happen. This is achieved through Supervisor Trees.

The Supervision Tree

Instead of a monolithic process where one unhandled exception crashes the entire server, the application is divided into a hierarchy of processes. Supervisors are processes whose only job is to monitor other processes (Workers or other Supervisors). If a child process crashes, the Supervisor restarts it according to a predefined strategy.

Root Supervisor
API
Supervisor
Database
Supervisor
Background
Worker

Restart Strategies

One for One

If a child process terminates, only that specific process is restarted. This is perfect for isolated tasks—like an independent user session or a single webhook payload—where a failure doesn't impact siblings.

One for All

If a child process terminates, all other sibling processes are terminated, and then all of them are restarted. This is used when processes are tightly coupled and cannot function safely without each other.

Rest for One

If a child process terminates, only the sibling processes started *after* it are terminated and restarted. Useful for boot sequences where step 3 depends on step 2, but step 1 is independent.

Ready to secure your workflows?

Let's discuss how this architecture can isolate failures in your platform.