TCP connections per channel

45 views
Skip to first unread message

Kumaran Loganathan

unread,
Jan 17, 2024, 3:50:26 PMJan 17
to grpc.io
How many TCP connections does a channel create and manage provided the DNS resolution of the server resolves to one ip address? Is it safe to assume that a channel just creates and manages one TCP connection for a given IP address?

Regards,
Kumaran

Eric Anderson

unread,
Jan 17, 2024, 3:59:47 PMJan 17
to Kumaran Loganathan, grpc.io
On Wed, Jan 17, 2024 at 12:50 PM Kumaran Loganathan <kumaranlo...@gmail.com> wrote:
How many TCP connections does a channel create and manage provided the DNS resolution of the server resolves to one ip address?

Technically, this is a decision that the client-side LB policy makes. However, none of our policies currently create more than one connection per IP to send new RPCs. If you use long-lived RPCs, there could be old TCP connections with those old RPCs on them, but those connections will close when the RPCs complete.

The default LB policy is pick_first, which only has one "active" TCP connection independent of the number of IP addresses. round_robin has one active connection per IP.

Kumaran Loganathan

unread,
Jan 17, 2024, 10:17:21 PMJan 17
to Eric Anderson, grpc.io
Thanks for the clarification. 
Reply all
Reply to author
Forward
0 new messages