• Home
Name Date Size #Lines LOC

..--

BUILDD22-Oct-20252 KiB6963

CMakeLists.txtD22-Oct-20252.4 KiB7566

README.mdD22-Oct-20251 KiB2920

client_flow_control_client.ccD22-Oct-20253.4 KiB12789

client_flow_control_server.ccD22-Oct-20253.3 KiB11267

server_flow_control_client.ccD22-Oct-20252.9 KiB10573

server_flow_control_server.ccD22-Oct-20253.7 KiB13294

README.md

1gRPC Flow Control Example
2=====================
3
4# Overview
5
6Flow control is relevant for streaming RPC calls.
7
8The underlying layer will make the write wait when there is no space to write
9the next message. This causes the request stream to go into a not ready state
10and the method invocation waits.
11
12# Server flow control
13
14In server case, gRPC will pause the server implementation that is sending the
15messages too fast. Server implementation is in
16[server_flow_control_server.cc](server_flow_control_server.cc). It will write
17a specified number of responses of a specified size as fast as possible.
18As client-side buffer is filled, the write operation will block until the buffer
19is freed.
20
21A client implementation in [server_flow_control_client.cc](server_flow_control_client.cc)
22will delay for 1s before starting a next read to simulate client that does not
23have resources for handling the replies.
24
25# Related information
26
27Also see [gRPC Flow Control Users Guide][user guide]
28
29 [user guide]: https://grpc.io/docs/guides/flow-control