Skip to content

xdsclient: support multiple xDS clients [A71] #6899

@easwars

Description

@easwars

Currently, we have a global singleton xDS client object defined here:

type clientRefCounted struct {

As part of xDS client fallback [A71], we want to support multiple xDS client objects, keyed on the dial target for channels and a dedicated well-known key for servers.

We already maintain such a map of xDS client objects that is used only for testing purposes. This map is keyed on the bootstrap configuration to be used by the xDS client. See here for details. We would have to follow the same pattern to support multiple xDS client objects for fallback.

A bunch of functions would need to be modified to support this:

  • xdsclient.New and xdslcient.NewWithConfig would be modified to accept the key for the xDS client to be created
    As mentioned earlier, the key for xDS-enabled clients would be the dial target and the key for xDS-enabled servers would a well known string.
  • xdsclient.NewWithConfigForTesting and xdsclient.NewWithBootstrapContentsForTesting would need to be modified to use the same map as used by the non-testing functions

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Type: FeatureNew features or improvements in behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions