title: Go gRPC Client Connection Scope and Pooling
body: <p>Considering the example from the Go gRPC code base:</p>
  
  <pre><code>func main() {
      // Set up a connection to the server.
      conn, err := grpc.Dial(address, grpc.WithInsecure())
      if err != nil {
          log.Fatalf("did not connect: %v", err)
      }
      defer conn.Close()
      c := pb.NewGreeterClient(conn)
  
      // Contact the server and print out its response.
      name := defaultName
      if len(os.Args) &gt; 1 {
          name = os.Args[1]
      }
      r, err := c.SayHello(context.Background(), &amp;pb.HelloRequest{Name: name})
      if err != nil {
          log.Fatalf("could not greet: %v", err)
      }
      log.Printf("Greeting: %s", r.Message)
  }
  </code></pre>
  
  <p>When consuming a gRPC service from another service what should the scope of the connection (<code>conn</code>) be? I assume it should have affinity with the scope of the request being handled be the consumer service, but I have yet to find any documentation around this.  Should I be using a connection pool here?</p>
  
  <p>E.G.</p>
  
  <ol>
  <li>gRPC consumer service receives request</li>
  <li>establish connection to gRPC service (either directly or via pool)</li>
  <li>make <em>n</em> requests to gRPC service</li>
  <li>close gRPC connection (or release back to the pool) </li>
  </ol>