Posts

Showing posts from November, 2022

Microservices communication using gRPC protocol

Image
  Hello everyone. In this article, we are going to learn about the gRPC protocol.  gRPC  has found huge success because of using HTTP/2 instead of HTTP/1.1 and protocol buffers instead of  XML  and  JSON .  gRPC Protocol = HTTP/2 + Protobuf gRPC is widely used for communication between internal microservices majorly due to its high performance and its polyglot nature. gRPC uses HTTP/2 as its transfer protocol and hence it inherits the benefits like binary framing from HTTP/2. As I mentioned in my previous article, HTTP/2 is robust, lightweight to transport, and safer to decode compared to other text-based protocols. Due to its binary nature, HTTP/2 forms a good combination with the Protobuf format. gRPC works in the same way as old Remote Procedure Calls(RPC). It is API oriented as opposed to REST protocol which is resource-based. Protbuf gives it support for 11 languages out of the box and all the benefits of binary protocol superpowers in terms of performance, throughput, and flexibi