Google Releases gRPC, a HTTP/2 RPC Framework for Microservices

| by Abel Avram Follow 11 Followers on Feb 27, 2015. Estimated reading time: 2 minutes |

Google has opened sourced gRPC, a RPC framework used internally to connect cloud microservices. gRPC comes with support for 10 languages, making it attractive for creating back-end cloud services for mobile applications.

gRPC is a language and platform-neutral RPC system developed and used internally by Google in many areas including cloud computing services, and they are going to expose most of their public APIs through such endpoints. Google considers gRPC a “bandwidth and CPU efficient, low latency way to create massively distributed systems that span data centers, as well as power mobile apps, real-time communications, IoT devices and APIs.”

While it can be used in many scenarios, gRPC is targeted primarily at microservices. A service interface and the data types it handles is defined using the Protocol Buffers IDL, and with the help of compilers one can generate client and server stubs in 10 languages: C, C++, C#, Go, Java, Node.js, Objective-C, PHP, Python, Ruby. The Java implementation seems to be mature, while the others are in Alpha (ready for early adopters) or pre-Alpha. Except for the Go and Java implementations, the others are wrappers around a C implementation of the core library. There is not yet an implementation for the browser, but Google is “actively exploring” such an option and invites for feedback.

The default data serialization format is Protocol Buffers, a new version Proto3 being just released. Besides a simplified syntax, Proto3 supports more languages and JSON encoding. gRPC can be extended to support other data formats as desired.

Answering to a question on why one would use gRPC over REST for microservices, Google writes:

gRPC largely follows HTTP semantics over HTTP/2 but we explicitly allow for full-duplex streaming. We diverge from typical REST conventions as we use static paths for performance reasons during call dispatch as parsing call parameters from paths, query parameters and payload body adds latency and complexity. We have also formalized a set of errors that we believe are more directly applicable to API uses cases than the HTTP status codes.

Providing support for generating client libraries for iOS and Android and running on HTTP/2, Google hopes developers will use gRPC to build back-end services for mobile applications. They consider that “bidirectional streaming, flow control, header compression, and multiplexing requests over a single TCP connection“ will “save battery life and data usage on mobile devices while speeding up services and web applications running in the cloud.”

The gRPC source code has been made available on GitHub under a BSD license.

Rate this Article

Adoption Stage

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Typo by Alexey Bykov

You have a GutHub instead of GitHub=)

Re: Typo by Abel Avram

Fixed. thx.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.

Recover your password...


Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.


More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.


Stay up-to-date

Set up your notifications and don't miss out on content that matters to you