Skip to content

Improve back-off logic for retrying after load errors #3370

@joluet

Description

@joluet

The current loader implementation retries after an error with linear backoff:

return Math.min((errorCount - 1) * 1000, 5000);

Instead it should use exponential backoff to reduce the potential API load in case of many client errors. That could look like this:

private long getRetryDelayMillis() {
      return Math.min( Math.pow(errorCount - 1, 2) * 1000, 8000);
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions