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
A67: xDS dynamic parameters #381
Open
allanrbo
wants to merge
5
commits into
grpc:master
Choose a base branch
from
allanrbo:xds-dynamic-params
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* Approver: @markdroth | ||
* Status: Draft | ||
* Implemented in: | ||
* Last updated: 2023-07-21 | ||
* Last updated: 2024-03-18 | ||
* Discussion at: | ||
|
||
## Abstract | ||
|
@@ -104,6 +104,9 @@ resources { | |
|
||
* CNCF xDS proposal | ||
[TP2: Dynamically Generated Cacheable xDS Resources](https://github.com/cncf/xds/blob/main/proposals/TP2-dynamically-generated-cacheable-xds-resources.md). | ||
* gRPC proposal[gRFC A47: xDS Federation](https://github.com/grpc/proposal/blob/master/A47-xds-federation.md). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can remove the words "gRPC proposal". Anyone reading this already knows what a gRFC is. :) |
||
Describes the common structure of the XdsClient. | ||
|
||
|
||
## Proposal | ||
|
||
|
@@ -205,13 +208,21 @@ function ConstructADSRequest(authority_resource_names) | |
|
||
### Temporary environment variable protection | ||
allanrbo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
During initial development, the GRPC_EXPERIMENTAL_XDS_DYNAMIC_PARAMETERS | ||
environment variable will control whether ADS requests will use the | ||
`resource_locators` field with dynamic parameters populated, instead of the | ||
`resource_names` field. This will help guard against if an xDS server does not | ||
yet support dynamic parameters, but the | ||
[bootstrap generator](https://github.com/GoogleCloudPlatform/traffic-director-grpc-bootstrap) | ||
already sets the `dynamic_parameters` fields. | ||
During development, the dynamic parameter functionality will be guarded by the | ||
GRPC_EXPERIMENTAL_XDS_DYNAMIC_PARAMETERS env var. Specifically, this env var | ||
will control two things: | ||
|
||
- Whether we read the new `dynamic_parameters` fields in the bootstrap | ||
config (and therefore whether we populate the `resource_locators` field in | ||
ADS requests). This guards against cases where the bootstrap file is | ||
generated by a separate tool with a release process independent of that of | ||
the application (e.g., the Traffic Director bootstrap generator), such | ||
that a newer bootstrap config may be used with an older version of gRPC. | ||
- Whether we look at the new `resource_names` field in ADS responses. This | ||
guards against xDS servers that may incorrectly start sending new fields | ||
to clients that are not yet ready to understand them. | ||
|
||
The env var protection will be removed once this feature passes interop tests. | ||
|
||
## Rationale | ||
|
||
|
@@ -225,11 +236,20 @@ changing the parameters. | |
|
||
### No metadata reuse | ||
|
||
An idea in TP2 is to reuse the node metadata field as dynamic parameters. I | ||
propose we do not do this. Clients already have node metadata configured in | ||
their bootstrap. If we reuse node metadata as dynamic parameters, clients will | ||
begin sending dynamic parameters without knowing whether a given control plane | ||
supports dynamic parameters. | ||
An idea in TP2 is to reuse the node metadata field as dynamic parameters. | ||
|
||
This idea is especially useful as a possible migration path for Envoy, where | ||
servers use node metadata to determine which resources to send for wildcard | ||
LDS and CDS subscrioptions. In contrast, node metadata is not as important in | ||
the gRPC xDS ecosystem, so this migration path is not considered important. | ||
|
||
Additionally, converting node metadata to dynamic parameters would be somewhat | ||
complex to implement, since node metadata can have structured values, whereas | ||
dynamic parameter values are always just strings. | ||
|
||
Additionally, an explicit knob in the bootstrap config that determines whether | ||
to use dynamic parameters is desirable for control. Using the presence of the | ||
`dynamic_parameters` field gives us that. | ||
|
||
### No merging of top-level and per-authority dynamic parmeters | ||
|
||
|
@@ -243,4 +263,4 @@ want this parameter for the xdstp case. | |
|
||
## Implementation | ||
|
||
Allan Boll (@allanrbo) plans to implement this in C++ in 2023 Q3. | ||
Allan Boll (@allanrbo) plans to implement this in C++ in 2024 Q3. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go ahead and create the mailing list thread, and then add a link to it here, as per the gRFC process.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to take care of this.