7 ms·
You shouldn't read too much from the benchmarks. The gRPC libraries are primarily developed by Google. Google pours most of its development resources on its co
by wesnerm2 5y ago
You shouldn't read too much from the benchmarks.
The gRPC libraries are primarily developed by Google. Google pours most of its development resources on its core languages: Java, Javascript, Go, C++, and Python. Google then allocates a developer to port the implementation to other languages and platforms. C++, unlike Java, is not typically used for cloud development, so I don't think a lot of resources were allocated for the language.
You can see how the difference in implementation effort can impact performance by comparing dotnet_grpc (Microsoft's fork) against csharp_grpc (Google's original implementation). There's more than a sevenfold improvement in req/s in Microsoft's implementation in the 1 CPU server case (35070 vs 5337), outperforming nearly all the Java benchmarks.
Also, many of those top performing JVM implementations are the same code running under a different garbage collector. .NET has two GCs each with a parallel option, but we only see one benchmark using likely the slower GC (Workstation GC instead of ServerGC).
- thinkharderdev 5y agoYeah, they are microbenchmarks so should definitely be taken with a grain of salt but the top performing one (on 3 CPUs) was akka-grpc which is definitely not built by Google and uses akka's native HTTP/2 stack. It's not even written in Java for the most part but mostly Scala.
- victor106 5y ago> It's not even written in Java for the most part but mostly Scala. Scala still runs on the JVM.
- Zababa 5y ago> C++, unlike Java, is not typically used for cloud development, so I don't think a lot of resources were allocated for the language. I though most of Google's infrastructure (such as Borg or things like that) was in C++.
- Matthias247 5y ago> C++, unlike Java, is not typically used for cloud development, so I don't think a lot of resources were allocated for the language. I think actually its the opposite, and the C++ implementation had seen most activity. Some other implementations (e.g. the node.js one, the initial version of .NET support, and also the rust_grpcio flavor) had been built on top of Googles C++ gRPC core library. I am not sure however if some of those now have moved to more native implementations recently, since I haven't followed the development closely.
- brunoborges 5y agoThere's also a lot of questionable decisions in the gRPC benchmarks. Thread polling plays a key role, and in the Java examples, the framework allows for a wide range of types. Disclaimer: contributor to the gRPC Java benchs.