Skip to content

A110: Child Channel Options#529

Open
AgraVator wants to merge 11 commits intogrpc:masterfrom
AgraVator:child-channel-plugins
Open

A110: Child Channel Options#529
AgraVator wants to merge 11 commits intogrpc:masterfrom
AgraVator:child-channel-plugins

Conversation

@AgraVator
Copy link
Copy Markdown
Contributor

No description provided.

@markdroth markdroth changed the title A110: Child Channel Plugins A110: Child Channel Options Dec 24, 2025
Copy link
Copy Markdown
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall design looks good, but I think the doc needs work.

My main concern is that we need a much better description of the overall design in a language-agnostic way, rather than just saying that we have a different design for each language. It's true that each language has its own APIs for how per-channel options are set, but the overall goal here is still to have a way to pass a set of options to be used in child channels. The semantics for that should be the same in all languages.

Please let me know if you have any questions. Thanks!

@AgraVator AgraVator requested a review from markdroth December 29, 2025 15:56
// TODO(AgraVator): add example for configuring child channel observability
```

## Rationale
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to say somewhere that we are not trying to provide any identity information about which channel is being created. The configuration provided by this gRFC is required to be uniform across child channels of a particular channel.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure this should be a non-goal? E.g. we might have xds client connections needing a different set of options from RLS connections/etc. It seems pretty plausible given that one team will own the control plane, but a different team would own the ext_proc services, so different credentials might be needed or different telemetry configuration may be desired.

This doesn't have to be hard; it could be a simple map from name->config.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not for credentials. Both of those channels would send telemetry to the same destination (configured here), so they'd use the same credentials. We would solve multi-ownership problems by allowing applying telemetry multiple times, a different time for each consumer/configuration.

I don't disagree that someone may want to identify the purpose of the child channel, but that then means we need some way to identify the purpose of the child channel. That's a bigger lift and opens up lots of complexities on how you will categorize the child channels' purposes. In our TL discussion about it, nobody could come up with a strong need for the info, we so left it for future work if/when it is needed.

// TODO(AgraVator): add example for configuring child channel observability
```

## Rationale
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not for credentials. Both of those channels would send telemetry to the same destination (configured here), so they'd use the same credentials. We would solve multi-ownership problems by allowing applying telemetry multiple times, a different time for each consumer/configuration.

I don't disagree that someone may want to identify the purpose of the child channel, but that then means we need some way to identify the purpose of the child channel. That's a bigger lift and opens up lots of complexities on how you will categorize the child channels' purposes. In our TL discussion about it, nobody could come up with a strong need for the info, we so left it for future work if/when it is needed.

Copy link
Copy Markdown
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking much better!

Please let me know if you have any questions. Thanks!

Copy link
Copy Markdown
Member

@markdroth markdroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking really good! The only really substantive remaining comment from me is the one from my last review pass about making sure we can plumb this into channels created via an LB policy or resolver.

@AgraVator AgraVator requested a review from ejona86 March 25, 2026 09:24
Comment on lines +85 to +86
* Conflict Resolution: Mandatory internal settings (`O_internal`) generally take
precedence over user-provided child options (`O_child`) to ensure correctness.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the user-provided options given less precedence here? There is more than one example of existing options where the user-provided option overrides values provided by things like the name resolver or the credentials. The reasoning being the user knows what they are doing, and if they are doing something stupid, we throw our hands up in the air.


This proposal introduces a mechanism to configure "child channels"—channels created internally by gRPC components (such as xDS control plane channel). Currently, these internal channels cannot easily inherit configuration (like metric sinks and interceptors) from the user application without relying on global state. This design proposes a language-specific approach to injecting configuration: using `functional interfaces` in Java, `DialOptions` in Go, and `ChannelArgs` in Core.
Complex gRPC ecosystems often require the creation of auxiliary channels that
are not directly instantiated by the user application. The primary examples are:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Go, the Channel passes a BuildOptions struct when creating a resolver or an LB policy. The struct is different for the two cases. But currently it contains things like credentials, dialer etc that the resolver and balancer should use if and when they are creating a Channel themselves.

We could add a new field in this struct to contain the child Channel options. As a long-term cleanup, we could deprecate some of the existing fields and move them to the newly added options field as well.

For the server, it should be simpler as the xDS-enabled server is the one that attempts to create the xDS client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants