I have a question regarding the grpc Dial behavior. I have a
server, which as part of the incoming request needs to talk to another
endpoint using grpc. Currently, on the server spawn, it does grpc.Dial to
the other endpoint. and when the request comes, it does a grpc on this
established connection. Two questions:
1. Is the connection via grpc.Dial persistent?
2. On the connection loss to the other endpoint, my grpc requests are
err rpc error: code = Unavailable desc = all SubConns are in
Do i need to dial out per request, that sounds expensive as the connection
establishment can take time. I was under the impression that Dial will
indefinitely try to establish the connection. Do i need to explicitly turn
on keepAlive to make that happen?
3. Also, if i want to limit how long the grpc request should take, one way
i know of is via the golang context. I was reading somewhere that the grpc
call itself, you can pass timeout. Which method is preferred?
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.