Commit 05dc252
authored
Change default reconnection policy to Exponential (#1896)
Change default reconnection policy to Exponential
Update the Exponential policy to take the base as parameter to allow for different growth rates
Description:
To speed up reconnections, and also avoid reconnection storms, we are changing the default reconnection policy to ExponentialRetry and reducing the deltaBackOff from the previous default of 5s to 2.5s. a
This allows more frequent retries early on, when a reconnection is more probable, and less frequent retries later on when it has already been impossible for some time.
Another plus for the ExponentialRetry is the additional randomness added to the intervals so that we avoid reconnection storms.
Here is a comparison of the two retry policies.


And here is a real world example:

The randomized exponential (orange) is within the the minimum delta (yellow) and the maximum exponential (gray).
The retry happens when the timeout (blue) is greater than the retry limit (orange).1 parent ccb5f42 commit 05dc252
File tree
2 files changed
+2
-1
lines changed- docs
- src/StackExchange.Redis
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
| 337 | + | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| |||
0 commit comments