RPC Timeouts
In gRPC, clients and servers can specify the amount of time a request may take for both unary and streaming calls. The term used for this functionality is “timeout.” The implementation of the timeout is language specific, but for the most part operates on the same concept.
Timeouts are important to consider if you are working with an application that may take a long time to process a call. If you don’t specify a timeout on a call, it can potentially operate forever (lets say your application accidentally goes into an infinite loop), causing compute resources to eventually block.
To overcome this, you specify a timeout on your RPC calls for how long you are willing to wait for it to complete. If a timeout is not specified on a gRPC request, the call is timeout and is interpreted as infinite.
When a client specifies a timeout, it is added to the request headers at the key grpc-timeout
with a numeric value and unit. For example to specify a timeout of 1...