Skip to content

Commit 89816bf

Browse files
Slow down retries so we keep retrying for more than 10 seconds. (#696)
= What was changed * Increase backoff factor to 1.7 (from 1.5) for non-poll RPCs = Why? The current backoff factor causes clients using the Core SDK to exhaust their retries within 6.011 to 8.966 seconds, depending on random jitter. We want to ensure that all clients keep retrying for at least 10 seconds. With the new backoff factor, retries will not be exhausted until 11.878 to 17.767 seconds after the initial failure. This advances progress on temporalio/features#27 (aka SDK-118 in internal Jira).
1 parent 6ad5da2 commit 89816bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ impl Default for RetryConfig {
200200
Self {
201201
initial_interval: Duration::from_millis(100), // 100 ms wait by default.
202202
randomization_factor: 0.2, // +-20% jitter.
203-
multiplier: 1.5, // each next retry delay will increase by 50%
203+
multiplier: 1.7, // each next retry delay will increase by 70%
204204
max_interval: Duration::from_secs(5), // until it reaches 5 seconds.
205205
max_elapsed_time: Some(Duration::from_secs(10)), // 10 seconds total allocated time for all retries.
206206
max_retries: 10,

0 commit comments

Comments
 (0)