Reputation: 129
We have written a grpc client and server. Whenever client and server are started, first 3-5 calls take more time in establishing connection. We are running 2 pods of grpc client and 2 pods of grpc server. Is there any connection settings that we are missing
Upvotes: 0
Views: 26
Reputation: 26
The very first gRPC call between a client and server pod involves establishing connection which takes time, its basically setup over a network (TCP, handshake, name resolution, etc.). Subsequent calls reuse this established connection, making them much faster. gRPC supports persistent connections. So, you might want to configure keep-alives correctly to prevent premature termination for subsequent RPCs.
Upvotes: 0