Process Orchestration and Supervision
Different Kinds of Elixir Supervisors
Supervisor
- When your child process list is known ahead of time
-
Great when you want to componentize part of your system
- Encapsulate several processes under one supervision tree
DynamicSupervisor
- When you don’t know what child processes will be running under the supervisor
-
New processes are started frequently and old processes terminate
-
When paired with the
Registry
module you can implement a lightweight process backed KV store
-
When paired with the
PartitionSupervisor (as of Elixir 1.14)
- Horizontally scale (replicate) a supervision tree or processes
- Deterministically route messages to partitions