Skip to content
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

Make the response ReadTimeout start on send #547

Closed
wants to merge 1 commit into from

Conversation

eapache
Copy link
Contributor

@eapache eapache commented Sep 30, 2015

Currently the broker sets the ReadTimeout from the moment when it starts
listening for the response. However, due to the serial blocking nature of kafka
network connections, this can be substantially later than the time we actually
sent the request, and can lead to long useless waits when the connection has
timed out but there are requests in the queue.

Instead, set the ReadTimeout from the moment we have successfully sent the
request.

@wvanbergen @4578395263256 this is one possible improvement to #546. I'm pretty sure it's wrong (for example if three requests are made simultaneously to one broker, and the first two take 15 seconds each then this change would cause the third request to time out immediately without waiting for a response) but perhaps some variation on it might be better.

Thoughts?

Currently the broker sets the ReadTimeout from the moment when it starts
listening for the response. However, due to the serial blocking nature of kafka
network connections, this can be substantially later than the time we actually
sent the request, and can lead to long useless waits when the connection has
timed out but there are requests in the queue.

Instead, set the ReadTimeout from the moment we have successfully sent the
request.
@eapache eapache closed this Sep 30, 2015
@eapache eapache deleted the broker-timeout-adjust branch September 30, 2015 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant