I was going through the docs of both supervisor and dynamic supervisor and saw that supervisor also has the function start_child that will allow us to start a worker dynamically using child_spec. Can anyone please elaborate what additional benefits DynamicSupervisor offers us since we can start workers dynamically using Supervisor module as well ?
What are the benefits of using dynamic supervisor when supervisor also has start_child to start workers dynamically?
here is some background:
We can already start a child in the normal
Supervisor by passing in a child spec so what benefits does
DynamicSupervisor give us?
DynamicSupervisor supports the
extra_arguments option, designed to replace the behavior of
DynamicSupervisor also supports a