The gRPC Framework

Let's take a closer look at what gRPC is and what key features it provides.

Introduction

API performance is highly dependent on the architecture of the back-end services. Network communication and system scalability are two important factors directly affecting the performance of web services. Technologies like Simple Object Access Protocol (SOAP), JSON-RPC, RESTful services, etc., have some limitations, such as tight coupling, additional processing, header overhead, interoperability issues, and so on. This led Google to develop the "Stubby" project in 2001 to address the problems above for its backends. The gRPC is an extended version of the Stubby project that was made public as free open-source software (F/OSS) by Google in 2015 and was accepted as an incubation project by CNCFCloud Native Computing Foundation in 2017.

What is gRPC?

gRPC is an RPC framework that achieves high performance by leveraging the multiplexing functionality introduced in HTTP/2 to create logical subchannelsA logical management of streams created by multiplexing an HTTP/2 connection. to support the following types of connections:

  • Request-response: The client can send a single request, and the server can reply with a single response.

  • Client streaming: The client can send multiple requests, and the server can reply with a single response.

  • Server streaming: The client can send a single request, and the server can reply with multiple responses.

  • Bidirectional streaming: The client can send multiple requests, and the server can reply with multiple responses.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.