title: Python grpcio best programming practice
body: <p>There is a topic talking about best practic </p>
  
  <p><a href="https://github.com/grpc/grpc-go/issues/682" rel="nofollow noreferrer">https://github.com/grpc/grpc-go/issues/682</a></p>
  
  <p>But I am not sure at last, How to use grpcio in my program.</p>
  
  <p>I  am using tensorflow-serving which is base on GRPC.  My client is based on python sdk grpcio-1.8.3. The client program is a Flask server with many APIs each of them holds identical channel and stub. </p>
  
  <p>When the tensorflow-serving(the GRPC server) restart,  the client program will failed into "Endpoint read failed" and would not recover any more.   </p>
  
  <p>But when I upgrade the grpcio to newer version,  The bug seems fixed, so that the client can reconnect automatically.</p>
  
  <p>And if the grpcio client, namely the Flask server holds one channel and stub globally, the error seems never appears.</p>
  
  <p>But  I am still not sure what is the best way to program with grpc client SDK like grpcio,  stable and high performance. Because there are even no exception testings on those examples, not to mention about how to use multiple channels and stubs in one process.</p>