-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The relationship between ManagedChannel, InternalSubchannel and netty channel #11736
Comments
Transport connection is only established to one of addresses in an EquivalentAddressGroup as gRPC considers them all equivalent. An InternalSubChannel holds only one ConnectionClientTransport denoting a transport connection, not multiple as you mentioned. gRPC's per-rpc load balancing happens across all the subchannels in a managed channel. |
Long, long ago gRPC Java supported dual-stack (IPv4 and IPv6 addresses for the same server). We knew each LB policy, even things like round-robin, would need pick-first behavior to choose the working version of IP. So we built pick-first into the Subchannel. We allow multiple EquivalentAddressGroups because the Attributes can be significant, so it prevents needing to merge multiple EAGs together (which we used to do, but stopped doing once Attributes mattered more). However, with xDS we started using hierarchical LBs, where one LB policy delegates to another. And they've worked out pretty well. And thus with the cross-language dual-stack design subchannels cross-language won't have multiple addresses and instead we're delegating to pick first itself. So we're in the middle of migrating from the old style and in the future subchannels will have only one address.
A subchannel can have up to one of (pending, active) transport. "pending" being connecting and "active" being connected. However, it can have many non-active/pending transports (stored in |
A ManagedChannel contains multiple InternalSubchannels, and an InternalSubchannel contains multiple TCP connections (ConnectionClientTransport). I have the following questions, can you help me answer them? Thanks.
The text was updated successfully, but these errors were encountered: