feat(tonic-xds): implement xds resources and route matchers#2533
Merged
YutaoMa merged 10 commits intohyperium:masterfrom Mar 17, 2026
Merged
feat(tonic-xds): implement xds resources and route matchers#2533YutaoMa merged 10 commits intohyperium:masterfrom
YutaoMa merged 10 commits intohyperium:masterfrom
Conversation
f7cb00d to
6040100
Compare
gu0keno0
reviewed
Mar 5, 2026
gu0keno0
reviewed
Mar 6, 2026
gu0keno0
reviewed
Mar 6, 2026
gu0keno0
reviewed
Mar 6, 2026
ankurmittal
reviewed
Mar 12, 2026
ankurmittal
reviewed
Mar 13, 2026
ankurmittal
reviewed
Mar 13, 2026
ankurmittal
reviewed
Mar 13, 2026
ankurmittal
reviewed
Mar 13, 2026
mingley
reviewed
Mar 13, 2026
mingley
reviewed
Mar 13, 2026
LucioFranco
reviewed
Mar 16, 2026
LucioFranco
approved these changes
Mar 16, 2026
compilation
c3fa3d9 to
4fad3bc
Compare
ankurmittal
approved these changes
Mar 17, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Ref: #2444
xDS Resource Types and Route Matching
xds-client(PR #2478 ) handles the ADS protocol but knows nothing about gRPC.tonic-xdshas its Tower service stack scaffolded but lacks the middle layer bridging xDS updates to routing decisions. This PR builds that foundation: validated resource types and a route matching engine that the upcoming resource manager will use to drive the LDS→RDS→CDS→EDS cascade and feed the existing Tower services.This is the 1st PR of a series to complete
tonic-xds. The next steps include:tower::discover::ChangestreamsXdsRouter+XdsClusterDiscoveryxds_client::ClientConfigSolution
Implements the xds_client::Resource trait for the four gRPC xDS resource types and adds a route compilation/matching engine, bridging xds-client watches to validated, efficient routing structures:
xds/resource/:ListenerResource(LDS),RouteConfigResource(RDS),ClusterResource(CDS),EndpointsResource(EDS) — each implementsxds_client::Resourcewith two-phase decode (deserialize + validate).xds/route/:CompiledRouteConfigpre-compiles aRouteConfigResourceat RDS update time (regex compilation, domain indexing), allows for allocation-free per-request matching.RouteInput/RouteDecisionmoved toclient/route(since it's used for Tower layer specifically, rather than the xDS subscription side of route logic this PR deals with).