Skip to content

Commit

Permalink
Improve connect robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter committed Feb 8, 2022
1 parent d0a93e9 commit 89f37cd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions distributed/comm/core.py
Expand Up @@ -297,9 +297,11 @@ def time_left():
except (asyncio.TimeoutError, OSError) as exc:
active_exception = exc

# The intermediate capping is mostly relevant for the initial
# connect. Afterwards we should be more forgiving
intermediate_cap = intermediate_cap * 1.5
# As descibed above, the intermediate timeout is used to distributed
# initial, bulk connect attempts homogeneously. In particular with
# the jitter upon retries we should not be worred about overloading
# any more DNS servers
intermediate_cap = timeout
# FullJitter see https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

upper_cap = min(time_left(), backoff_base * (2 ** attempt))
Expand Down

0 comments on commit 89f37cd

Please sign in to comment.