-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
correct way to check internet connection goes away #7841
Comments
@ukai do you know how DialPool handles failures? Does it transparently retry using a new ClientConn/Channel from the pool when one ClientConn fails? If yes, then you would always see a DNS resolution failure when sending the first request on a new ClientConn. |
I don't know how DialPool handles the failure, as I'm not maintainer of google.golang.org/api/transport/grpc... |
it just call grpc.DialContext for pool size, and pick roundrobin?
How can we distinguish DNS resolution failures (want no retry) from transient Unavailable failure (want retry) |
When creating a channel using grpc.Dial(), the default resolver scheme is passthrough. When using passthrough, the hostname resolution isn't done by gRPC, but it happens when a transport is created by calling net.DIal. This means that the hostname resolution happens every time a transport is created. I can't think of a way of differentiating b/w network connectivity failures and DNS resolutions failures when using passthrough. If the DNS resolver is used by explicitly using the
If the DNS lookup fails in the first connection attempt using a ClientConn, an error similar to the following will be returned:
Note: There is a known issue with the DNS resolver (#7556) in which the hostname is resolved on the client even when using an http connect proxy. We plan to fix this in the next gRPC Go release. |
This issue is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed. |
When internet connection goes away in the long running process, grpc returns
(using google.golang.org/api/transport/grpc's DialPool).
How should we heck this error type?
I think we want to retry for Unavailable, but we'd like to report this error to the user without retry.
The text was updated successfully, but these errors were encountered: