You can manage and securely expose your gRPC services through the Apinizer platform. You can use the high-performance RPC framework developed by Google, work with Protocol Buffers (protobuf) format. You can create gRPC API Proxy from protobuf file, import proto file, define services and methods, and configure routing
Protobuf Format
gRPC API Proxy performs message processing in Protocol Buffers (protobuf) format. This format is more compact and faster than JSON.
HTTP/2 Protocol
gRPC runs on HTTP/2 protocol and provides multiplexing support.
Streaming Support
Supports Unary, Server Streaming, Client Streaming, and Bidirectional Streaming methods.
High Performance
Provides higher performance than JSON thanks to binary protobuf format.
Development → API Proxies item is selected in the main menu on the left. The +Create button at the top right of the opened interface is clicked and gRPC API option is selected.
2
Upload Protobuf File
There are three methods to upload a protobuf file:
Method 1: File Upload
The Upload File button is clicked. A .proto file is selected from your computer. The file is automatically parsed and service information is displayed.
Protobuf File Format A protobuf file is a file that defines your gRPC services. The file contains definitions such as service, rpc, message.
Method 2: Load from URL
The Enter URL link is clicked. The URL of the protobuf file is entered and the Parse button is clicked. The file is parsed and service information is displayed.
Method 3: Paste as Text
The Paste as Text option is selected. The protobuf content is pasted into the text field and the Parse button is clicked. The content is parsed and service information is displayed.
3
Check Service Information
After the parse operation is completed, the following information is displayed:
Package
Protobuf package name
Services
All gRPC services
Methods
RPC methods for each service
Message Types
Request and response message types
Streaming Type
Unary, Server Streaming, Client Streaming, or Bidirectional Streaming
4
Routing Configuration
Client Route (Relative Path)
Client Route is the endpoint where the API Proxy is exposed to the outside world. Clients access the gRPC service through this endpoint.Example:
Copy
Relative Path: /grpc/user-service
In this case, the gRPC service is accessed as follows:
Copy
{apinizer-gateway}/grpc/user-service
Upstream Target (Backend Address)
Upstream Target is the address of your backend gRPC service. The API Proxy routes requests to this address.Configuration Format:
Copy
host:port
Example:
Copy
backend-grpc.example.com:50051
gRPC Port gRPC services usually run on special ports like 50051. Make sure you correctly specify the port number of your backend service.
5
gRPC Routing Configuration
Special routing configuration can be made for gRPC. For more information, you can refer to the gRPC Routing page.
6
Save API Proxy
All information is checked. The Relative Path field is filled (required). Upstream Target information is entered (in host:port format). The Save button at the top right is clicked.