# Always double reconnection delay and add jitter \(\#35337\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/45af1fcc2f6c201012f0045fa320f7667f6348a4)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 45af1fcc2f6c201012f0045fa320f7667f6348a4

Requested commit: 45af1fcc2f6c201012f0045fa320f7667f6348a4

Commit: 45af1fcc2f6c201012f0045fa320f7667f6348a4

Tree: a4deb185b8f493cf6ec2127898725df1bf4b8cdc

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Always double reconnection delay and add jitter (#35337)

Previously, we would pick an exponent between 0.5 and 2.5, which would
cause a lot of clients to try reconnecting in rapid succession,
overwhelming the server as a result.

This pull request always doubles the previous delay and introduces a
jitter that can, at most, double it.

As part of this, we're also increasing the maximum reconnection delay
from 10s to 30s: this gives us more space to spread out the reconnection
requests.

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
```

## Parents

- [0aea5acc68a5c2469cd0e61d8253d5162a7baa3e](https://git.cafe/gitcafe/zed/commit/0aea5acc68a5c2469cd0e61d8253d5162a7baa3e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/45af1fcc2f6c201012f0045fa320f7667f6348a4?format=markdown)
