murgatroid99 3466c4b55d Updated copyrights há 10 anos atrás
..
lb_policies 3466c4b55d Updated copyrights há 10 anos atrás
resolvers 7536af02cf Eliminate gpr_ int types - and insist on C99 variants instead há 10 anos atrás
README.md 698d00c60e Add ipv4:, ipv6: schemes há 10 anos atrás
client_config.c a82950e683 clang-format all core files há 10 anos atrás
client_config.h a82950e683 clang-format all core files há 10 anos atrás
connector.c a82950e683 clang-format all core files há 10 anos atrás
connector.h 5b194036b2 Making the stack work with outgoing channel args. há 10 anos atrás
default_initial_connect_string.c 9e52a2dd81 header fix for windows há 10 anos atrás
initial_connect_string.c a6124120ae first part, secure channel only há 10 anos atrás
initial_connect_string.h 30e1727583 msan and windows fix há 10 anos atrás
lb_policy.c e2c62375e4 clang-format há 10 anos atrás
lb_policy.h e2c62375e4 clang-format há 10 anos atrás
lb_policy_factory.c a82950e683 clang-format all core files há 10 anos atrás
lb_policy_factory.h c7705c7c47 Introduced grpc_lb_policy_args há 10 anos atrás
lb_policy_registry.c a82950e683 clang-format all core files há 10 anos atrás
lb_policy_registry.h c7705c7c47 Introduced grpc_lb_policy_args há 10 anos atrás
resolver.c cb2609f475 Signal back to resolver on error há 10 anos atrás
resolver.h cb2609f475 Signal back to resolver on error há 10 anos atrás
resolver_factory.c a82950e683 clang-format all core files há 10 anos atrás
resolver_factory.h a82950e683 clang-format all core files há 10 anos atrás
resolver_registry.c a82950e683 clang-format all core files há 10 anos atrás
resolver_registry.h bc85be10ef Refactor default host name resolution há 10 anos atrás
subchannel.c 7536af02cf Eliminate gpr_ int types - and insist on C99 variants instead há 10 anos atrás
subchannel.h e2c62375e4 clang-format há 10 anos atrás
subchannel_factory.c a82950e683 clang-format all core files há 10 anos atrás
subchannel_factory.h a82950e683 clang-format all core files há 10 anos atrás
uri_parser.c b063c87596 mark unreachable code with a macro há 10 anos atrás
uri_parser.h 526789159c Added queries and fragments to uri parser há 10 anos atrás

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_client_config 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_client_config.

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_subchannel_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