My first instinct is to simply use one http.Client per each micro service.

So when talking to microservice A - i would retrieve the client for 
microservice A from somewhere.
The immediate gain is that it presumably already has tcp connection (or 
several) open to the service A.

It is also possible to overwrite the dial methods to hook in your own code 
for tracing connections. To see when they are opened and closed.

At work we wrote this to abstract and share setting as they might be 
relevant to talking to each service.

https://github.com/gadventures/httpclient

Good luck

Jakub

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to