Docs
Apache APISIXGet startedKey ConceptsProtos

Protos

Understand the concept of protos in Apache APISIX, which facilitates efficient data serialization and communication between services.

Overview

In APISIX, proto objects contain protocol buffer (protobuf) definitions which define the service interface and message types used in communication with upstream gRPC services.

The following diagram illustrates the concept of a proto object using an example of APISIX transcoding between HTTP and gRPC. In this example, the route /grpc-echo is associated with the plugin grpc-transcode and a proto object:

Diagram of APISIX transcoding between HTTP and gRPC

The gRPC server is registered with EchoService defined in echo.proto file, which echoes back string input from incoming requests.

To enable gRPC communication between APISIX and the server, add the protocol buffer definitions specified in the echo.proto file to the proto object in APISIX. APISIX and the gRPC server then agree on the specifications of data exchange, so that APISIX can communicate with the gRPC server and relay the responses back to the client over HTTP.

To use grpc-transcode for protocol transcoding, see Transcode HTTP to gRPC.

Tasks that use this concept

Related concepts