db-scheduler icon indicating copy to clipboard operation
db-scheduler copied to clipboard

Feature - circuit-breaking per task

Open kagkarlsson opened this issue 3 years ago • 2 comments

Support simple circuit breaker pattern per task. So if a certain task is failing consistently, backoff trying to poll executions from that task.

kagkarlsson avatar Mar 25 '22 09:03 kagkarlsson

I'm probably missing something: how would that differ from using a FailureHandler.ExponentialBackoffFailureHandler or one of its friends?

frederikb avatar Apr 15 '22 11:04 frederikb

Sure, a FailureHandler will cover the worst of it. I was considering high-throughput cases. If you have 100+ executions/s and depend on some external system to be up, it will put unnecessary load on the database if the executions will need to be updated to new execution-times continuously. An exponential backoff FailureHandler will alleviate much of the problem, but maybe not all. We might instruct the database to not poll executions of tasks that are known to be "down", i.e. they will not be executed at all and no need to lock, update execution-times etc.

kagkarlsson avatar Apr 19 '22 08:04 kagkarlsson