• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Client Configuration Support for GRPC
2=====================================
3
4This library provides high level configuration machinery to construct client
5channels and load balance between them.
6
7Each `grpc_channel` is created with a `Resolver`. It is the resolver's duty
8to resolve a name into a set of arguments for the channel. Such arguments
9might include:
10
11- a list of (ip, port) addresses to connect to
12- a load balancing policy to decide which server to send a request to
13- a set of filters to mutate outgoing requests (say, by adding metadata)
14
15The resolver provides this data as a stream of `grpc_channel_args` objects to
16the channel. We represent arguments as a stream so that they can be changed
17by the resolver during execution, by reacting to external events (such as
18new service configuration data being pushed to some store).
19
20
21Load Balancing
22--------------
23
24Load balancing configuration is provided by a `LoadBalancingPolicy` object.
25
26The primary job of the load balancing policies is to pick a target server
27given only the initial metadata for a request. It does this by providing
28a `ConnectedSubchannel` object to the owning channel.
29
30
31Sub-Channels
32------------
33
34A sub-channel provides a connection to a server for a client channel. It has a
35connectivity state like a regular channel, and so can be connected or
36disconnected. This connectivity state can be used to inform load balancing
37decisions (for example, by avoiding disconnected backends).
38
39Configured sub-channels are fully setup to participate in the grpc data plane.
40Their behavior is specified by a set of grpc channel filters defined at their
41construction. To customize this behavior, transports build
42`ClientChannelFactory` objects, which customize construction arguments for
43concrete subchannel instances.
44
45
46Naming for GRPC
47===============
48
49See [/doc/naming.md](gRPC name resolution).
50