20

I don't like tools that do many things at once. So GRPC seems to me overhead, it's like kubernetes. GRPC is the tool that combines actually two things: extended Protobuf (Service support) and HTTP2.

I read a lot of articles saying that using GRPC is awesome for performance. And there are two reasons

  • protobuf is used, it's smaller than json or xml.
  • GRPC uses HTTP2 for transport protocol

Here is main part: protobuf and HTTP2 are independent projects, tools, whatever. With that understanding i can say that GRPC is nothing but combining several different tools, like kubernetes combines docker and orchestration tools.

So my questions is: What's actual advantages of using GRPC vs HTTP2 with any payload (CSV, XML, JSON, etc).

Let's skip part about serialization because as i mentioned protobuf is independent library from grpc

Alexander Kondaurov
  • 3,677
  • 5
  • 42
  • 64

1 Answers1

21

As you pointed out, gRPC and Protobuf are often conflated. While, in the vast majority of cases, gRPC will be using protobuf as an IDL and HTTP/2 as the transport, this is not always the case.

So then, what value does gRPC provide on its own? For starters, it provides battle-tested implementations of each of those transports, along with first class support for the protobuf IDL. Integrating these things is not trivial. gRPC packages all of them into one nice pluggable box so you don't have to do the legwork.

It also provides you with functionality that HTTP/2 on its own does not. Pluggable authorization/authentication, distributed tracing instrumentation, debugging utilities, look-aside load balancing (including upcoming support for the xDS protocol), and more are provided.

Richard Belleville
  • 1,445
  • 5
  • 7
  • 6
    Really great answer. You seem to know a lot about gRPC. Would have loved to hear some nice things about JSON-RPC's use cases and pros. – Paul-Sebastian Manole Jun 25 '20 at 20:15
  • 2
    The problem is ultimately that not every language implementation of grpc has all those features. Like the node grpc library doesn't support promises and server side interceptors... etc. So while GRPC the protocol might have support, implementations may lack them. – CMCDragonkai May 07 '22 at 01:36