net/rpc: expected Timeout based alternatives to functions for rpc.Dial, rpc.DialHTTP, rpc.DialHTTPPath [proposal].
harshavardhana opened this issue · 2 comments
Please answer these questions before submitting your issue. Thanks!
- What version of Go are you using (
go version
)?
go1.6
- What operating system and processor architecture are you using (
go env
)?
linux/amd64
- What did you do?
Just using rpc.DialHTTP, rpc.Dial from an rpc client.
- What did you expect to see?
Expected Timeout based functions for rpc.Dial, rpc.DialHTTP, rpc.DialHTTPPath.
- What did you see instead?
Default functions like rpc.Dial, rpc.DialHTTP, rpc.DialHTTPPath use just net.Dial which is a dialer without any timeout, this ends up waiting too long on all operating systems leading to a perception that something is hung. It would be nicer to have a timeout based dialer for 'rpc' client, since a failover, or error could be reported to user during a disconnect can be achieved in a quick manner.
This is just a proposal, feel free to close if this is intentional to not provide timeout based dialers for rpc.
Related: #7946 (and see https://go-review.googlesource.com/#/c/17271/)