-
Notifications
You must be signed in to change notification settings - Fork 443
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
producer: connection backoff #96
Comments
This sounds good. For the case of |
This gets back to my comment on nsqio/nsq#380 about the semantics of |
I like to think of it as "oh hey, while consuming I got in a bad state, I'm going to set my RDY to 0 and also not even look at anything that was in flight". Also, with current behavior, a nsq_to_nsq would only attempt, say, 8 before the backoff window is over, meaning only 8 have a higher attempt. If we fast track returned errors in backoff windows, then up to MaxInflight messages would get an attempt incremented, which is different behavior, which could mean potentially thousands of messages are one step closer to death. |
For cases where you want max attempts, I don't think considering this edge case as an attempt to be a practical concern. For other cases (where you want "infinite" attempts) it doesn't matter anyway. |
I suppose that's true, which means this issue can go forward, but I still think that |
In #95 we documented a case where
nsq_to_nsq
(which uses bothConsumer
andProducer
) would panic due to a bug in the exit timeout code path.The bug is exacerbated by the fact that in rare cases the producer could block serially for
1s
perPUB
if the remote address is black holing the connection attempts.An alternative strategy might be to back off connection attempts and return errors instantly during backoff windows.
Thoughts?
The text was updated successfully, but these errors were encountered: