GETTING EDGY VIDEO SERIES

Getting Edgy: Understanding gRPC and gRPC Web

What’s the difference between gRPC and gRPC web?

Stephanie Coyle
Ambassador Labs
Published in
2 min readDec 2, 2019

--

gRPC and gRPC-Web are entirely different protocols, but ultimately were built to work together.

What is gRPC?

gRPC stands for remote procedure protocol and was developed by Google. It is a high performance, low latency messaging protocol that, when implemented, can send and receive messages to and from clients and servers concurrently, also known as fully duplex and bidirectional messaging.

gRPC sends a binary “blob” or chunk of data over HTTP/2 and because of its lightweight and efficient performance, it is often used for data communication because it can handle a lot of requests.

gRPC in Action

You can also use gRPC to define interfaces in terms of protocol buffers (“protobuf”). For example, you can use gRPC to define a service greeter and its interface, and it can generate a client and server that speaks the same protocol.

By defining exactly what you need, you can have a single service greeter in one place while implementing the client in multiple places, such as a mobile client or a back end service, with guaranteed compatibility.

What is gRPC-Web?

While similarly named, gRPC-Web is a distinctly different protocol. It exists solely in a browser and acts as a translation layer between gRPC and your application in a browser. The “web” client in gRPC-Web receives requests over HTTP 1.1 or HTTP/2 and then sends the requests through a proxy.

This proxy must understand gRPC-Web as it then translates the requests into pure gRPC for backend consumption.

The web client of gRPC-Web allows for easier coordination between the browser and back end services of your application, and continues to provide compatibility wherever you implement the protocol. It also removes the need to configure separate HTTP clients between backend services and your application.

Learn More: gRPC

Learn More: gRPC-Web

Subscribe to the Ambassador YouTube Channel to get updates about new weekly videos!

--

--

Technical writer from Boston, MA with a love of solving big, complicated problems.