GRPC Core  9.0.0
gRPC Name Resolution

Overview

gRPC supports DNS as the default name-system. A number of alternative name-systems are used in various deployments. We support an API that is general enough to support a range of name-systems and the corresponding syntax for names. The gRPC client library in various languages will provide a plugin mechanism so resolvers for different name-systems can be plugged in.

Detailed Design

Name Syntax

A fully qualified, self contained name used for gRPC channel construction uses URI syntax as defined in RFC 3986.

The URI scheme indicates what resolver plugin to use. If no scheme prefix is specified or the scheme is unknown, the dns scheme is used by default.

The URI path indicates the name to be resolved.

Most gRPC implementations support the following URI schemes:

The following schemes are supported by the gRPC C-core implementation, but may not be supported in other languages:

In the future, additional schemes such as etcd could be added.

Resolver Plugins

The gRPC client library will use the specified scheme to pick the right resolver plugin and pass it the fully qualified name string.

Resolvers should be able to contact the authority and get a resolution that they return back to the gRPC client library. The returned contents include:

The plugin API allows the resolvers to continuously watch an endpoint and return updated resolutions as needed.