Craig Tiller 87cc0848ce client_config bugfixes vor 10 Jahren
..
lb_policies 87cc0848ce client_config bugfixes vor 10 Jahren
resolvers abf36389d4 Make SSL work vor 10 Jahren
README.md 9e8f9115c4 Rename configured_subchannel --> subchannel vor 10 Jahren
client_config.c d7b68e72f5 Simple request unsecure passes with new client_config code vor 10 Jahren
client_config.h 3bc8ebd48e Implementation work for client_config vor 10 Jahren
connector.c 4ab82d2c4d clang-format vor 10 Jahren
connector.h 4ab82d2c4d clang-format vor 10 Jahren
lb_policy.c 4ab82d2c4d clang-format vor 10 Jahren
lb_policy.h 4ab82d2c4d clang-format vor 10 Jahren
resolver.c 9846503567 Debugging vor 10 Jahren
resolver.h 9846503567 Debugging vor 10 Jahren
resolver_factory.c eb3b12e417 Further client config work vor 10 Jahren
resolver_factory.h 3bc8ebd48e Implementation work for client_config vor 10 Jahren
resolver_registry.c 49924e0e62 Better handling of cancellation, uri parse errors, and disconnection vor 10 Jahren
resolver_registry.h eb3b12e417 Further client config work vor 10 Jahren
subchannel.c 87cc0848ce client_config bugfixes vor 10 Jahren
subchannel.h 87cc0848ce client_config bugfixes vor 10 Jahren
subchannel_factory.c eb3b12e417 Further client config work vor 10 Jahren
subchannel_factory.h f7afa1f1ba client_config: chttp2_fullstack_no_op_unsecure_test passes vor 10 Jahren
uri_parser.c 49924e0e62 Better handling of cancellation, uri parse errors, and disconnection vor 10 Jahren
uri_parser.h 49924e0e62 Better handling of cancellation, uri parse errors, and disconnection vor 10 Jahren

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.

A load balancing policies primary job 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.