0

gRPC supports rpc server and client implementation in many languages. I need to know whether there is any significant performance differences in implementing gRPC server and client in goLang v/s Java . If we are looking for high performance and scale , which implementation will be better go or java

Thanks Girish T S

girish TS
  • 209
  • 1
  • 3
  • 10
  • If you look at the official gRPC web site, it has plenty of benchmarks – marco.m Sep 16 '19 at 11:54
  • benchmarking is fun, but it never tells the whole story. It depends on the quality of the code, or even how you define performance. Raw throughput, maintenance cost, scaling, stability, etc... As for gRPC itself, in my experience the performance difference between well written Java and Go being similar, with Go just edging out Java in our use-cases. This was with people having a couple of years experience writing golang. The first attempts by Java devs to write go tend to be bloated an inefficient, also worth keeping in mind – Elias Van Ootegem Sep 16 '19 at 14:59

2 Answers2

1

Take a look at the public grpc benchmarks. The multi-language performance dashboard @master shows Go and Java pretty neck-and-neck. In general Java has slightly better performance and latency, but Go does better in some cases like latency with streaming ping-pong.

Since they are so similar, it is probably best to decide which language you want to use based on other factors.

Eric Anderson
  • 24,057
  • 5
  • 55
  • 76
  • The above-shared dashboard does not have data. I am using this https://stackoverflow.com/questions/57955090/grpc-implementation-performance-java-v-s-golang#:~:text=In%20general%20Java%20has%20slightly,use%20based%20on%20other%20factors. – roottraveller Feb 16 '22 at 09:11
  • The public grpc benchmark page has been updated to link to https://grafana-dot-grpc-testing.appspot.com/ instead. I've updated the answer to point to the new dashboard. But it's also linked from "public grpc benchmarks." – Eric Anderson Feb 16 '22 at 17:27
0

There was a recent Hacker news post related to this, apparently the Java implementation is bloated and heavy.

Don't Use Protobuf for Telemetry

Tore Nestenius
  • 16,431
  • 5
  • 30
  • 40