-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http2: Writes starving reads? #12320
Comments
Any idea @ejona86 ? |
I looked into it and confirmed the behavior. But I haven't determined why ioRatio isn't avoiding this problem. |
@ejona86 the benchmark/test is strange (no warmup, just 1K input buffers) and I am not personally confident how the protocol is supposed to work. |
@franz1981 How would one know if a timeout happens because of this (potential) issue or any other reason that can lead to a timeout? Is there instrumentation that is available that one could hook into? Here is some additional context: grpc/grpc-java#8912 (comment). The code merely tries to show that during certain, fabricated, conditions Netty seem to fare worse than other transport (OkHttp in this case). If this is something that actually happens in practice or if it's even a Netty issue, I don't know yet. |
Expected behavior
Running the reproducer code the client should succeed the majority of RPCs without hitting the deadline (100ms).
Actual behavior
Using gRPC or servicetalk the reproducer will fail most RPC while using OkHttp does not. The commonality between gRPC and servicetalk is that they are both built on Netty, although with different implementations.
This issue was initial raised here: grpc/grpc-java#8912 and contains some more information; It was speculated that it might be due to writes starving reads and seeing that OkHttp uses separate dedicated threads for reading and writing would explain why it does not exhibit the same behavior here.
Steps to reproduce
Run the reproducer with either
-Dcom.grpc.example.transport=netty
or-Dcom.grpc.example.transport=servicetalk
system property set.Minimal yet complete reproducer code (or URL to code)
https://github.com/tommyulfsparre/repro-netty-http2
Netty version
4.1.72.Final
JVM version (e.g.
java -version
)Java 11
OS version (e.g.
uname -a
)Does this sound plausible and if so is there anything that can be tweak in Netty to alleviate this?
The text was updated successfully, but these errors were encountered: