Supervisor restart should allow for exponential backoff on retry #146
Labels
A-supervisor
Area: Supervisor related issues
C-feature-request
Category: Feature Request
enhancement
New feature or request
Is your feature request related to a problem? Please describe.
For some failure models, such as a client trying to connect to a server which is offline, the current supervision model will effectively
loop { connect(); }
over and over again, with no "safe" backoff on retrying the child.Describe the solution you'd like
Ideally, I would like to specify an ExponentialBackOff strategy for my supervisor, such that when children hit failures, the process will not simply consume 100% CPU trying to retry the child.
backoff is an example implementation that works on arbitrary closures, which may be worth borrowing code or ideas from.
Describe alternatives you've considered
Me manually putting a thread sleep into the child doesn't seem like a good idea 😸
The text was updated successfully, but these errors were encountered: