[erlang-questions] Supervisor Death Kills Workers?
Mon Aug 24 17:30:10 CEST 2009
Dnia 2009-08-24, pon o godzinie 10:06 -0500, David Mercer pisze:
> As workers are linked to their supervisors, the behaviour of a supervisor,
> therefore, is to kill its workers if it itself dies. I had thought that it
> was the job - and about the only job - of the supervisor to restart workers
> when they stop, not to stop the workers if not working under supervision.
> To my thinking, this introduces a single point of failure where previously
> there wasn't: if the top-level supervisor terminates, then you've lost your
> entire system.
This is the reason why you should not do any hackerish work with
supervisors. You will for sure introduce some bugs and bring eventually
whole system down.
Keep it simple, keep it working.
As it is now, it is well tested and do the right job. Any input to the
supervisor (like child specification) is first full tested before using
it in any way.
So we can trust that supervisor code is correct an can be trusted, to
never crash due to the errors there.
But if there is any reason it will crash (like dropped messages or
memory exhausted) , the best want anyone can do is kill all supervisor
tree under it, because previous assumption is wrong, and restart it from
scratch (eventually terminating/restarting whole system after multiple
restarts in small period of time).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: To jest cz??? wiadomo?ci podpisana cyfrowo
More information about the erlang-questions