-
-
Notifications
You must be signed in to change notification settings - Fork 289
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
Implement exponential backoff for Remote #463
Comments
@sudsy I agree with you that the message should just go to dead letter process. |
Question is what to do with the remote endpoint over time. e.g. lets say we reach backoff limit, messages go to deadletter. that is, should we have a circuit breaker here? |
I think that is a good pattern. If the server is still down, messages will accumulate but we won't be wasting cycles connecting to it due to exponential backoff. More importantly, if the connection is failing due to the remote or network being overloaded, the exponential backoff will contribute as little as possible to that overload.
Dead forever does seem like a bad choice. The connection problems could have been due to some sort of network or remote overload. We would want the connection to recover when the conditions improve. |
I found out that the new version of the endpoint writer has a lot of additional logging with string interpolation. I am quite sceptical about it. String interpolation is called before it reaches the check if debug level logging is enabled, it is a slow operation and requires allocation. I don't think we should be doing that. Logging is cool but we need to ensure that debug log is not adding any burden if it is not enabled. |
I have implemented a design for this in my own branch but don't want to commit it until I am sure it is right.
When a remote connection fails it should backoff the connection retries eventually failing if the connection is not available after a configured number of retries.
If a new message is received for that particular remote after the retry process is completed, the whole connection routine should be reset with a new exponential backoff retry upon failure.
What I am not clear on is what to do with the messages that accumulate between 1. and 2. My thinking is that once 1. is completed, all the queued messages for that remote should be dumped to the dead letter process. Does anyone have other suggestions?
The text was updated successfully, but these errors were encountered: