I am learning gRPC implementing things with node.js. I read that gRPC and inter microservice communication goes well together.
What is the problem that gRPC solves that REST couldn't in context of inter microservice communication?
Why to use gRPC for inter microservice communication?
GRPC has following benefits Lightweight messages. Depending on the type of call, gRPC-specific messages can be up to 30 percent smaller in size than JSON messages.
High performance. By different evaluations, gRPC is 5, 7, and even 8 times faster than REST+JSON communication.
Built-in code generation. gRPC has automated code generation in different programming languages including Java, C++, Python, Go, Dart, Objective-C, Ruby, and more.
More connection options. While REST focuses on request-response architecture, gRPC provides support for data streaming with event-driven architectures: server-side streaming, client-side streaming, and bidirectional streaming.
gRpc had the following benefits over old Rpc.
gRPC offers a refreshed take on the old RPC design method by making
it interoperable, modern, and efficient using such technologies as
Protocol Buffers and HTTP/2.
The following benefits make it a solid candidate for replacing REST in some operations.
Lightweight messages. Depending on the type of call, gRPC-specific messages can
be up to 30 percent smaller in size than JSON messages.
High performance. By different evaluations, gRPC is faster than REST+JSON communication.
Built-in code generation. gRPC has automated code generation in different programming languages including Java, C++,Python, Go, Dart, Objective-C, Ruby, and more.
More connection options. While REST focuses on request-response architecture, gRPC provides support for data streaming with event-driven architectures: server-side streaming, client-side streaming, and bidirectional streaming.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With