golang/go

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!

  1. What version of Go are you using (go version)?

go1.6

  1. What operating system and processor architecture are you using (go env)?

linux/amd64

  1. What did you do?

Just using rpc.DialHTTP, rpc.Dial from an rpc client.

  1. What did you expect to see?

Expected Timeout based functions for rpc.Dial, rpc.DialHTTP, rpc.DialHTTPPath.

  1. 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.

adg commented

We don't want to do this, in light of #16844. Thanks for your time.