What's the connection between the writeQuota and flow control window in grpc-go?

25 views
Skip to first unread message

Icarus Wu

unread,
Sep 15, 2025, 11:00:53 AM (11 days ago) Sep 15
to grpc.io
Recently, I hit a `Send` block problem with grpc-go streaming. We located the problem that happened in the flowcontrol.go/writeQuota with pprof. I'm trying to read the source code to figure out how the flow control works, but it's a little bit complex.

If someone is familiar with grpc-go, could you please explain the following 3 ingredients in the flow control? I'd like to know if they're impacted by each other.
Thanks.


1. writeQuota: https://github.com/grpc/grpc-go/blob/master/internal/transport/flowcontrol.go#L30

2. trInFlow: https://github.com/grpc/grpc-go/blob/master/internal/transport/flowcontrol.go#L80

3. inFlow: https://github.com/grpc/grpc-go/blob/master/internal/transport/flowcontrol.go#L119

Also, it looks like the quota of 'writeQuota' is hardcoded in 64 * 1024 and can not be changed.
Reply all
Reply to author
Forward
0 new messages