backoff icon indicating copy to clipboard operation
backoff copied to clipboard

Canonical way to handle error bursting

Open truekonrads opened this issue 1 year ago • 0 comments

Hello,

What would be the canonical way to handle error bursting and enter an "error-disable" state?

Imagine you have a very long running function, such as HTTP polling, which from time to time may thrown an exception that should be handled using classic backoff approach. However, sometimes there are too many exceptions in a short period of time and you want to propagate the exception upwards or otherwise just exit. If I simply accumulate number of exceptions using max_tries then over a longer period the exceptions will accumulate. In short one exception every hour is OK, but 10 exceptions in an hour are not.

truekonrads avatar Jan 04 '23 05:01 truekonrads