Tune streaming backoff on errors to retry a bit faster when TCP connections drop

This commit is contained in:
Paul Banks 2021-02-18 16:13:51 +00:00 committed by Paul Banks
parent 44718456b5
commit 5529cb7347
1 changed files with 7 additions and 3 deletions

View File

@ -113,9 +113,13 @@ func newMaterializer(
Logger: deps.Logger,
Waiter: &retry.Waiter{
MinFailures: 1,
MinWait: 0,
MaxWait: 60 * time.Second,
Jitter: retry.NewJitter(100),
// Start backing off with small increments (200-400ms) which will double
// each attempt. (200-400, 400-800, 800-1600, 1600-3200, 3200-6000, 6000
// after that). (retry.Wait applies Max limit after jitter right now).
Factor: 200 * time.Millisecond,
MinWait: 0,
MaxWait: 60 * time.Second,
Jitter: retry.NewJitter(100),
},
Request: newRequestFn,
}), nil