New in Gloo: Connect JSON Clients to Your gRPC Services

At Solo, our vision for Gloo is to “glue” together every kind of microservice, monolith, and serverless function. Every protocol, every messaging system, every application architecture will be seamlessly glued together by a unified API that any client can connect to and communicate with, completely abstracted from the implementation of back-end services. After releasing our NATS integration last week, next on our list was integration of gRPC services.

It’s impossible to work in the cloud-native space these days and not hear about gRPC. The gRPC protocol offers massive improvements over traditional REST APIs. gRPC provides out-of-the-box support for encryption, streaming APIs, strongly-typed messaging, compression, and a host of other benefits you can read more about here.

It is only natural that the next-generation gateway Gloo would support gRPC APIs. Because of the power and scalability they provide, gRPC APIs are a natural choice for greenfield microservices. Developers are held back, however, because many client applications are unable to speak the gRPC protocol. gRPC forces clients to switch from HTTP/1 to HTTP/2, and from JSON to protobuf, a binary serialization format. Upgrading a back-end API to gRPC therefore breaks clients such as web browsers, which cannot implement the strongly-typed binary protocol that gRPC requires. Even clients that can support protobuf, such as those written in Java and Node.js must be upgraded from their old JSON/REST protocol, or the microservice must simultaneously support a JSON and gRPC API, doubling the work (and the potential for bugs) on the part of the developer.

Gloo now bridges this gap by providing JSON-to-gRPC translation, mapping your gateway APIs to any back-end, regardless of whether it implements REST or gRPC. Easily upgrade your back-end services without deprecating your clients. Gloo even supports canary and blue-green deployments, allowing you to gradually shift traffic from older RESTful APIs to new gRPC services.

Gloo’s sophisticated service discovery automatically detects running gRPC services and discovers their exposed functions to simplify routing. Proto files and descriptors do not need to be uploaded to Gloo, they can be automatically generated by the discovery service with no additional work for the user.

To be clear, gRPC-to-gRPC routing is already possible with Gloo, as it is supported by Envoy with zero configuration required for the user. Gloo now enables JSON-to-gRPC transcoding as well as detection and discovery for gRPC services.

We encourage you to check out our Getting started with gRPC tutorial for Gloo, and experience the power of Gloo today.