Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

implement resource-based routing #1181

Closed
mr-salty opened this issue Jan 9, 2020 · 5 comments
Closed

implement resource-based routing #1181

mr-salty opened this issue Jan 9, 2020 · 5 comments
Assignees
Labels
api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Milestone

Comments

@mr-salty
Copy link
Contributor

mr-salty commented Jan 9, 2020

Spanner clients should determine the endpoint(s) to use by calling InstanceAdmin.GetInstance and consulting Instance.endpoint_uris in the response, falling back to the default endpoint if no useable endpoints are returned.

  // Output only. The endpoint URIs based on the instance config.
  // For example, instances located in a specific cloud region (or multi region)
  // such as nam3, would have a nam3 specific endpoint URI.
  // This URI is to be used implictly by SDK clients, with fallback to default
  // URI. These endpoints are intended to optimize the network routing between
  // the client and the instance's serving resources.
  // If multiple endpoints are present, client may establish connections using
  // any of the given URIs.
  repeated string endpoint_uris = 8;

Since the backends may not yet support this, we may need to make it optional (the go client uses an environment variable) for this purpose. However, as noted previously, the client must already fall back to the default endpoint so perhaps making it optional is not necessary.

@mr-salty mr-salty added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Jan 9, 2020
@mr-salty mr-salty added this to the Spanner: GA milestone Jan 9, 2020
@mr-salty
Copy link
Contributor Author

mr-salty commented Jan 9, 2020

One open question/TODO: if multiple endpoint_uris are returned, and the client is configured to use multiple gRPC channels, should it pick one endpoint for all channels, or distribute channels across endpoints?

@mr-salty
Copy link
Contributor Author

mr-salty commented Jan 9, 2020

per the cloud spanner team, all clients should allow the feature to be disabled by environment variable (GOOGLE_CLOUD_SPANNER_ENABLE_RESOURCE_BASED_ROUTING=false) for troubleshooting (and as discussed above we may want to default it to false until feature launch)

@google-cloud-label-sync google-cloud-label-sync bot added the api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. label Jan 29, 2020
@coryan
Copy link
Member

coryan commented Feb 1, 2020

FWIW, we need new versions of the spanner .proto files to implement this, and when we get those files the generated .cc files stop compiling on Windows due to protocolbuffers/protobuf#7076.

I filed #1230 to remind us that all those updates are needed before we can implement this code.

@devbww
Copy link
Contributor

devbww commented Feb 9, 2020

#1253 gave us the new versions of the spanner .proto files.

@devjgm
Copy link
Contributor

devjgm commented Feb 14, 2020

Due to "reasons", we're dropping this.

@devjgm devjgm closed this as completed Feb 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: spanner Issues related to the googleapis/google-cloud-cpp-spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants