GRPC connection socket policy

222 views
Skip to first unread message

Александр Сергеев

unread,
Feb 21, 2024, 7:30:04 PM2/21/24
to grpc.io
Good afternoon!
Quickly looking through the documentation, I wasn't able to find an answer to a question that interested me, so maybe you could help me here.
I was wondering, how many socket connections are being used when GRPC client communicates to GRPC server? Does one GRPC "channel" operate inside of one TCP socket or does it reconnect every time user calls another procedure?
I think that understanding this might be important to learn more about GRPC performance (since closing and re-opening TLS sockets, for instance, might take a lot of time).
Thank you in advance for your response!
Best regards!

Larry Safran

unread,
Feb 21, 2024, 7:43:58 PM2/21/24
to Александр Сергеев, grpc.io
As mentioned in the core concepts guide, the exact behavior of closing channels is language dependent.  Note that you can have multiple RPCs simultaneously using the same channel.  As long as a channel is "active" it will stay connected.  For streaming RPCs, the keepalive call option can keep the channel connected even when there are long breaks between messages.

Hope that helps,
  Larry

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/10df9e08-0f8e-4cbc-b971-cbabd04c502en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages