A supervision tree is a hierarchy of supervisors and workers that organizes service lifecycles, restarts failed processes, and confines errors to the smallest practical part of a system. section 9.0 section 9.1.6
Use the tree diagram to trace supervisors, workers, service boundaries, startup order, shutdown order, and failure propagation. section 9.1.6
A well-granulated tree provides several operational capabilities:
- Place each worker under a supervisor so an individual crash can trigger an individual restart while unrelated services continue operating. section 9.0
- Define startup and shutdown order through parent-child relationships; terminate a supervisor to take down an entire subsystem and its descendants. section 9.1.6
- Escalate persistent failures: a database supervisor can stop its workers after excessive restarts, allowing the system supervisor to start a fresh database pool. section 9.1.6
A resilient to-do system
Separate the process registry, database, and cache into supervised services. A database error should not stop cached data from being served, and a failed database worker should not affect other database operations. section 9.0
Supervision supports “let it crash”: worker code can avoid defensive recovery when a supervisor can restart the process with clean state. Explicit handling remains appropriate for critical processes or errors with a meaningful local response. section 9.3 section 9.4
