Related Documentation
Made by
Kong Inc.
Supported Gateway Topologies
hybrid db-less traditional
Supported Konnect Deployments
hybrid cloud-gateways serverless
Compatible Protocols
grpc grpcs http https tcp tls tls_passthrough udp ws wss
Tags

The gRPC-Web plugins allows access to a gRPC service via the gRPC-Web protocol. Primarily, this means JavaScript browser applications using the gRPC-Web library.

A service that presents a gRPC API can be used by clients written in many languages, but the network specifications are oriented primarily to connections within a data center. gRPC-Web lets you expose the gRPC API to the Internet so that it can be consumed by browser-based JavaScript applications.

This plugin translates requests and responses between gRPC-Web and gRPC. The plugin supports both HTTP/1.1 and HTTP/2, over plaintext (HTTP) and TLS (HTTPS) connections.

Why gRPC?

Unlike JSON, gRPC is a binary protocol, which uses Protobuf definitions to describe how the data is marshalled and unmarshalled. Because binary data is used instead of text, it’s a more efficient way to transmit data over a network. However, this also makes gRPC harder to work with, because inspecting what went wrong is more challenging. Additionally, few clients natively handle gRPC.

For flexibility and compatibility with RESTful expectations, the gRPC-Gateway plugin offers more configurability, whereas the gRPC-Web plugin adheres more directly to the Protobuf specification.

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!