Mark D. Roth f0231ba07e Fix bug from merge. 9 lat temu
..
README.md ff4df06a66 Rename grpc_client_config to grpc_resolver_result. 9 lat temu
channel_connectivity.c 20b8333efa Sanitizing master. 9 lat temu
client_channel.c f0231ba07e Fix bug from merge. 9 lat temu
client_channel.h 6053497f21 Code review changes. 9 lat temu
client_channel_factory.c 74071cdab0 Merge branch 'subchannel_factory_create_lb_channel' of github.com:dgquintas/grpc into ccmerge 10 lat temu
client_channel_factory.h f40a1972d0 Fix include guards 10 lat temu
client_config_plugin.c 30e53cd4c4 Experimental wrapped language fix 10 lat temu
connector.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
connector.h 99b642a1f5 Use exec_ctx where it should be, and fix leak 9 lat temu
default_initial_connect_string.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
http_connect_handshaker.c 5c28096ce3 Fix merge problems. 9 lat temu
http_connect_handshaker.h 39b5871d7b Use http_proxy environment variable instead of URI query param. 9 lat temu
initial_connect_string.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
initial_connect_string.h 5aceb27408 Fix include guards 10 lat temu
lb_policy.c 331b9c02f9 Moved LB token changes solely into grpclb.c 9 lat temu
lb_policy.h 8424fdcb70 PR comments 9 lat temu
lb_policy_factory.c 7f7d165fa8 Code review changes. 9 lat temu
lb_policy_factory.h 933c955aaf Merge remote-tracking branch 'upstream/master' into http_connect 9 lat temu
lb_policy_registry.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
lb_policy_registry.h 5aceb27408 Fix include guards 10 lat temu
parse_address.c 9885bff5fb Factored out parse functions from sockaddr_resolver 10 lat temu
parse_address.h 9885bff5fb Factored out parse functions from sockaddr_resolver 10 lat temu
resolver.c ff4df06a66 Rename grpc_client_config to grpc_resolver_result. 9 lat temu
resolver.h ff4df06a66 Rename grpc_client_config to grpc_resolver_result. 9 lat temu
resolver_factory.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
resolver_factory.h 0e48a9af49 Move LB policy instantiation from resolvers into client_channel. 9 lat temu
resolver_registry.c 0e48a9af49 Move LB policy instantiation from resolvers into client_channel. 9 lat temu
resolver_registry.h 0e48a9af49 Move LB policy instantiation from resolvers into client_channel. 9 lat temu
resolver_result.c 5461235bcd Merge remote-tracking branch 'upstream/master' into service_config 9 lat temu
resolver_result.h 5461235bcd Merge remote-tracking branch 'upstream/master' into service_config 9 lat temu
subchannel.c 34dac9d4ca Merge remote-tracking branch 'upstream/master' into max_send_size_filter 9 lat temu
subchannel.h 933c955aaf Merge remote-tracking branch 'upstream/master' into http_connect 9 lat temu
subchannel_factory.c d4c9833187 Reposition files to optionalize client_config system 10 lat temu
subchannel_factory.h 4a6dad3970 clang-fmt 10 lat temu
subchannel_index.c 933c955aaf Merge remote-tracking branch 'upstream/master' into http_connect 9 lat temu
subchannel_index.h 5aceb27408 Fix include guards 10 lat temu
uri_parser.c 3e94de19cd Merge branch 'optionalize_resolvers' into optionalize_client_config 10 lat temu
uri_parser.h 3e94de19cd Merge branch 'optionalize_resolvers' into optionalize_client_config 10 lat temu

README.md

Client Configuration Support for GRPC

This library provides high level configuration machinery to construct client channels and load balance between them.

Each grpc_channel is created with a grpc_resolver. It is the resolver's duty to resolve a name into configuration data for the channel. Such configuration data might include:

  • a list of (ip, port) addresses to connect to
  • a load balancing policy to decide which server to send a request to
  • a set of filters to mutate outgoing requests (say, by adding metadata)

The resolver provides this data as a stream of grpc_resolver_result objects to the channel. We represent configuration as a stream so that it can be changed by the resolver during execution, by reacting to external events (such as a new configuration file being pushed to some store).

Load Balancing

Load balancing configuration is provided by a grpc_lb_policy object, stored as part of grpc_resolver_result.

The primary job of the load balancing policies is to pick a target server given only the initial metadata for a request. It does this by providing a grpc_subchannel object to the owning channel.

Sub-Channels

A sub-channel provides a connection to a server for a client channel. It has a connectivity state like a regular channel, and so can be connected or disconnected. This connectivity state can be used to inform load balancing decisions (for example, by avoiding disconnected backends).

Configured sub-channels are fully setup to participate in the grpc data plane. Their behavior is specified by a set of grpc channel filters defined at their construction. To customize this behavior, resolvers build grpc_client_channel_factory objects, which use the decorator pattern to customize construction arguments for concrete grpc_subchannel instances.

Naming for GRPC

Names in GRPC are represented by a URI (as defined in RFC 3986).

The following schemes are currently supported:

dns:///host:port - dns schemes are currently supported so long as authority is

               empty (authority based dns resolution is expected in a future
               release)

unix:path - the unix scheme is used to create and connect to unix domain

               sockets - the authority must be empty, and the path
               represents the absolute or relative path to the desired
               socket

ipv4:host:port - a pre-resolved ipv4 dotted decimal address/port combination

ipv6:[host]:port - a pre-resolved ipv6 address/port combination