Skip to content

Conversation

@goller
Copy link
Collaborator

@goller goller commented Dec 17, 2025

Previously, we could get TCP I/O timeouts if we had routing issues.

Empirically, we found that having two dialers, one that retries quickly and one that is the default dialer, decreases the routing issues on some networks.

Previously, we could get TCP I/O timeouts if we had routing issues.

Empirically, we found that having two dialers, one that retries quickly
and one that is the default dialer, decreases the routing issues on
some networks.

Signed-off-by: Chris Goller <goller@gmail.com>
Comment on lines +59 to +66
// It uses two different dialers.
// The dialer connects first is returned, and the other is canceled.
//
// The first has a short timeout (200 ms) and continues to retry until it succeeds.
// The second dialer has no timeout and will block until it either succeeds or fails.
//
// We are doing this because we see connection timeouts perhaps caused by some competing network routes.
// Our workaround is to use a short timeout dialer that will retry until it succeeds.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We dont need a retry limit bc the second one will eventually fail or succeed? Do we want to set some maximumum limit or log the timing so if this does end up being quite long we can see what the hold up is?

Comment on lines +26 to +31
if errors.Is(err, context.DeadlineExceeded) {
continue
}
if errors.Is(err, os.ErrDeadlineExceeded) {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

understanding check: these are the only errors we're retrying for and others will just get returned below?

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.

3 participants