grpc / grpc/grpc-java

visibility into client-side queuing and flow control

Open
#11,114 7 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

Outgoing messages in a call can be internally queued by gRPC due to HTTP2 flow control. Client calls can additionally be delayed from even starting due to the underlying HTTP2 connection hitting its `MAX_CONCURRENT_STREAMS` limit. There should be a public API that can observe gRPC-internal queuing of outgoing messages. This could be useful when when debugging a `DEADLINE_EXCEEDED` RPC; it's very informative to know if the request never left the client's queues.

Basically, I'd like to revive https://github.com/grpc/grpc-java/issues/8945. To recapitulate the findings on that issue:
- `StreamTracer.outboundMessageSent` is called after a message is sent to the transport not when the message hits the network.
- `onReady` callbacks are strongly correlated with messages being released onto the network. However, unary calls do not send `onReady` callbacks.

One way to resolve this issue would be to change `StreamTracer.outboundMessageSent` to be called after the message is actually sent to the network. Alternatively a new `StreamTracer` callback—`outboundMessageTransmitted`?—could serve that purpose.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.