Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / deps / grpc / src / core / ext / filters / client_channel / README.md
1 Client Configuration Support for GRPC
2 =====================================
3
4 This library provides high level configuration machinery to construct client
5 channels and load balance between them.
6
7 Each `grpc_channel` is created with a `Resolver`. It is the resolver's duty
8 to resolve a name into a set of arguments for the channel. Such arguments
9 might 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
15 The resolver provides this data as a stream of `grpc_channel_args` objects to
16 the channel. We represent arguments as a stream so that they can be changed
17 by the resolver during execution, by reacting to external events (such as
18 new service configuration data being pushed to some store).
19
20
21 Load Balancing
22 --------------
23
24 Load balancing configuration is provided by a `LoadBalancingPolicy` object.
25
26 The primary job of the load balancing policies is to pick a target server
27 given only the initial metadata for a request. It does this by providing
28 a `ConnectedSubchannel` object to the owning channel.
29
30
31 Sub-Channels
32 ------------
33
34 A sub-channel provides a connection to a server for a client channel. It has a
35 connectivity state like a regular channel, and so can be connected or
36 disconnected. This connectivity state can be used to inform load balancing
37 decisions (for example, by avoiding disconnected backends).
38
39 Configured sub-channels are fully setup to participate in the grpc data plane.
40 Their behavior is specified by a set of grpc channel filters defined at their
41 construction. To customize this behavior, transports build
42 `ClientChannelFactory` objects, which customize construction arguments for
43 concrete subchannel instances.
44
45
46 Naming for GRPC
47 ===============
48
49 See [/doc/naming.md](gRPC name resolution).