Skip to content

Conversation

markdroth
Copy link
Member

No description provided.

@markdroth markdroth changed the title A95: xDS LEDS and Fallback Improvements A95: xDS Endpoint Fallback Apr 18, 2025
protocol variant. The list collection will be an `LbEndpointCollection`
resource, introduced in https://github.com/envoyproxy/envoy/pull/38777.

The validation rules for EDS as described in [A27] will change as
Copy link
Member

Choose a reason for hiding this comment

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

How will this new data be encoded coming out of XdsDependencyManager in A74? We'll need to update XdsEndpointResource to support a reference to LbEndpointCollection, but do we

  1. have XdsDependencyManager have a list of the localities with their own LbEndpointCollectionResource (closer to how we handle XdsRouteConfigResource) or
  2. rewrite the XdsEndpointResource to remove the references and inline the endpoint information as if LEDS wasn't used?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are two different API layers here:

  1. The XdsConfig representation generated by XdsDependencyManager and exposed to the resolver and LB policy code.
  2. The individual resource type implementations exposed from XdsClient to XdsDependencyManager.

I think that for (1), the representation wouldn't change, since that representation already combines all resources into a single data structure, and that data structure is essentially structured in terms of how we need to use the data in the LB policy tree, independently of how it was represented in xDS resources.

For (2), there needs to be a separate object for each individual xDS resource, since each resource type that we plug into XdsClient needs to produce some type for the parsed resource. But since the LbEndpointCollection can either be inlined in EDS or obtained from a separate LEDS resource, I expect that we'll handle this the same way that we do for the RouteConfiguration, which can either be inlined in LDS or obtained from a separate RDS resource. In C-core, we handle this by having a field in the parsed LDS resource that either specifies the RDS resource name or inlines the parsed RouteConfiguration. So I expect that what we'll do here is to add a new LEDS resource, and then change the existing parsed EDS representation to specify either the name of the LEDS resource or the parsed LbEndpointCollection itself.

Note that the actual parsing logic for the LbEndpointCollection is the same, regardless of whether it's inlined in EDS or sent in a separate LEDS resource. So we should be able to just refactor the current EDS parsing code; we shouldn't need to duplicate it. Today, when the RouteConfiguration is inlined into the LDS resource, the LDS resource parser essentially calls out to the RDS resource parser. I expect that we'll do the same here, where the EDS parser will call out to the LEDS parser.

Copy link
Member

Choose a reason for hiding this comment

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

(2) seems pretty clear to me; we've done that before, including code sharing.

For (1), A74 has:

    struct EndpointConfig {
      XdsEndpointResource endpoints;
      std::string resolution_note;
    };

Are you saying XdsEndpointResource is a different object than produced by XdsClient? That's news to me. And that's surprising, as then there'd be no need for route_config, as that could be inlined into XdsListenerResource:

struct XdsConfig {
  // Listener resource.
  XdsListenerResource listener;
  // RouteConfig resource.  Will be populated even if RouteConfig is
  // inlined into the Listener resource.
  XdsRouteConfigResource route_config;

Right now I thought the resources presented in XdsConfig are identical to what was received. I agree we could change them, but we already had an opportunity to rewrite one and we didn't take it. So I feel like we need to spell out what's expected here, since this is also the sort of thing you want everyone doing the same way.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I misunderstood your question. You're right, we need to change the XdsConfig representation.

I've added some text to spell this out.

copybara-service bot pushed a commit to grpc/grpc that referenced this pull request Jun 30, 2025
…39889)

First part of A95 (grpc/proposal#486).

Closes #39889

COPYBARA_INTEGRATE_REVIEW=#39889 from markdroth:xds_fallback_criteria_knob 70702bf
PiperOrigin-RevId: 777375509
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Aug 23, 2025
…rpc#39889)

First part of A95 (grpc/proposal#486).

Closes grpc#39889

COPYBARA_INTEGRATE_REVIEW=grpc#39889 from markdroth:xds_fallback_criteria_knob 70702bf
PiperOrigin-RevId: 777375509
@ejona86 ejona86 self-requested a review September 3, 2025 16:20
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.

2 participants