You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I've seen in the code and behaviour after user (correct me if I'm wrong), currently the exponential reconnect backoff rate is a bit overboard.
The current formula is for reconnect wait is configured_wait * 10^retry_attemps
With defaults:
configured_wait: 5000
max_retry_attemps: 10
You get an a reconnect pattern as such:
5,000 (5 Seconds)
50,000 (50 seconds)
500,000 (~8 minutes)
5,000,000 (~1 hour)
50,000,000 (~13 hours)
500,000,000 (~5 days)
5,000,000,000 (~57 days)
50,000,000,000 (~1.5 years)
500,000,000,000 (~15.8 years)
5,000,000,000,000 (~158 years)
As you can see the numbers get pretty high even if only after the 3rd attempt. This potentially locks your process up with no hope of reconnecting in a viable timeframe. IMHO this completely defeats the purpose of the reconnect function.
My suggestion would be to set-up an exponential back-off rate which plateaus towards a maximum wait time. Graph would something like this: https://en.wikipedia.org/wiki/Sigmoid_function
The text was updated successfully, but these errors were encountered:
I agree. I have implemented this sort of logic in this pull request : #43
As you will notice it is not strictly speaking a Sigmoid function, but it has a similar behaviour for positive integers. The waiting time will be limited to five times the configured interval.
This pull request has been pending for a long time, I hope it will finally be merged.
From what I've seen in the code and behaviour after user (correct me if I'm wrong), currently the exponential reconnect backoff rate is a bit overboard.
The current formula is for reconnect wait is
configured_wait * 10^retry_attemps
With defaults:
configured_wait: 5000
max_retry_attemps: 10
You get an a reconnect pattern as such:
As you can see the numbers get pretty high even if only after the 3rd attempt. This potentially locks your process up with no hope of reconnecting in a viable timeframe. IMHO this completely defeats the purpose of the reconnect function.
My suggestion would be to set-up an exponential back-off rate which plateaus towards a maximum wait time. Graph would something like this: https://en.wikipedia.org/wiki/Sigmoid_function
The text was updated successfully, but these errors were encountered: