Re: delayed child restart with incremental back-off
Loïc Hoguin <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Organization | Nine Nines |
| Message-ID | <[email protected]> |
On 03/05/2021 12:18, Maria Scott wrote: >> but something like this would be good to >> have. Then we could get rid of supervisor2 in RabbitMQ ( >> https://github.com/rabbitmq/rabbitmq-server/blob/master/deps/rabbit_common/src/supervisor2.erl#L15 >> for the delay part, non-backoff in our case ). > > I have only read the comment (4) explaining the delay behavior in supervisor2, and I guess it does things a bit different from what the OP seems to ask for. Specifically, it says that when a child exceeds the restart limit, another restart attempt will be delayed instead of the supervisor shutting down. What the OP asks for, if I understand correctly, is delays between restart attempts in general (right?) I don't think the details of the implementation matter too much. A backoff would work just as well, if not better, than what supervisor2 does. -- Loïc Hoguin https://ninenines.eu