-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support exponential backoff for reconnects #249
Comments
If the general idea is okayish I can work on a PR for this feature. |
Sounds good, as long as it does not add too much complexity. I'd prefer to keep the number of options well below Might be worth looking at the paho.mqtt.golang functionality (but it's probably better to use an |
As I had some similar functionality written once for a Java project I tried to somehow transfer it to Go. |
Is your feature request related to a problem? Please describe.
When there is a large number of clients and there is some kind of synchronization event (e.g. broker restart, update, etc.) the reconnect will trigger a reconnect storm.
Describe the solution you'd like
I'd like to be able to provide a "backoff strategy".
For mass-clients it could implement an exponential backoff, for some e.g. some kind of backend service it could use a fixed value similar to what we have right now.
Both strategies could be implemented as generic solutions which would allow user to customize then according to their needs / infrastructure abilities.
Describe alternatives you've considered
A rate limiter on the broker side sure helps but is more of an add-on than an alternative to a backof strategy.
Additional context
No additional context.
The text was updated successfully, but these errors were encountered: