Skip to content

Conversation

@Westwooo
Copy link
Contributor

WIP

This PR is the initial implementation of optimised routing for gRPC. The main additions are:

  1. resolver.go: here we implement a custom gRPC resolver that resolves all of the A records for a given hostname and saves the IP address in the attributes so that we can retrieve the sub-channel that corresponds with the IP address we want to send an RPC to.
  2. load_balancing_policy.go: This implements a custom load balancing policy that uses routinginfo from the meta data of an RPC to find the optimal sub channel to use for a given kv operation. The routing info contains a list of the IPs of CNG instances that are local to the vBucket where the request needs to go.
  3. routingManager.go: This is responsible for getting the list of IPs that are used to populate the routing info meta data mentioned above. The routing manger uses the watchRouting RPC to maintain a map from vBucket ID to optimal IP addresses.

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