DELAPARRA
Index
Color
NL
Category: Programming paradigms

Supervision

Explained by Updated

What is Supervision?

Supervision: A parent actor monitors its children and decides how to recover them (restart, stop, escalate) when they crash. Supervision is how actor systems like Erlang and Akka handle failure. Every actor has a parent, its supervisor, which watches it. When a child crashes, the supervisor decides what to do: restart it, stop it, or pass the problem up to its own supervisor.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Supervision

How is Supervision used in practice?

This leads to the "let it crash" philosophy. Instead of defensive code for every possible error, an actor that ends up in a bad state simply fails, and its supervisor restarts it in a known good state.

What should you keep in mind with Supervision?

The idea shows up outside actor systems too. Kubernetes restarts crashed containers, systemd restarts failed services, and process managers like Supervisor keep queue workers running. Combined with good logging and alerts on frequent restarts, it makes systems recover from many problems without anyone stepping in.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.