As a user, Pulp will retry downloads by default 3 times and I can configure this value on my Remote
Currently Pulp will only retry on specific http error codes:
429 - Too Many Requests 502 - Bad Gateway 503 - Service Unavailable 504 - Gateway Timeout
The need to retry¶
- It's expected by users. Almost all (if not all) download tools, e.g. curl, wget, etc have retry behaviors in them
- With sync having so many downloads occur and a single error halting the entire process, as it is now, Pulp is not very reliable
What to retry on¶
With the implementation of this feature Pulp will retry in the following situations:
- All HTTP 5xx response codes
- HTTP 429
- Socket timeouts and TCP disconnects
Exponential Backoff and Jitter¶
Retries will continue to use the backoff and jitter already used today.
Number of Retries¶
The default will be 5, which was the Pulp2 default.
Remote will get a new field:
retry_count = models.PositiveIntegerField(default=5)
Updated by ggainey over 2 years ago
"configurable per-remote, w/a new Remote field" means a data-migration, which has impacts on backporting. I'd like to see the code w/a hardcoded 5 as one commit, and add the migration/check-per-remote to be a separate commit. Could be same PR, could even be different ones.
Updated by email@example.com over 2 years ago
I would suggest to lower the default value to 3.
If we plan to retry on all the codes, I don't think retying, for example, on code 500 for 5 times is a good idea,with the default base and factor of the
backoff.expo we will loose ~30 seconds.