gRPC Routing
If API type is gRPC, this tab is visible.
This section contains routing settings for gRPC API Proxy Type.
After the API Proxy receives messages from clients and executes policies if any, it routes the message to the Backend API. The Routing tab is the tab where this routing operation is configured.
Routing Tab settings are shown in the following image:
Adding New Address
A new address can be added from the window that opens when the ➕ button in the column header area at the far right of the window opened with the Configure button is clicked.
In the new address addition window:
- Backend API address is entered in the Address field or environment variable is used
- Environment Variables Selection Dialog can be opened by clicking the list icon button on the right of the Address field
- Selected environment variable is copied to clipboard and pasted into the Address field
Updating Address
The address can be updated in the window that opens when the Configure button in the Address (Address) column of the table showing addresses is clicked.
If this value is desired to change automatically according to the environment it is in, selection can be made from Environment Variables (Environment Variable).
The address can be updated in the window that opens when the Configure button in the Address (Address) column of the table showing addresses is clicked.
Environment Variables (Environment Variable) Selection dialog detail is specified in the following image.
When the list icon button on the right of the address input field is clicked, the Environment Variables Selection Dialog opens. Through this dialog, all environment variables (Environment Variables) defined in the project can be viewed and selected.
In the Environment Variables Selection Dialog:
- All environment variables are listed (Global and Environment-Specific)
- Filtering can be done by variable name or description with the search box
- Key Name, Description, Type information is displayed for each variable
- The format of the selected variable (
${variableName}) is automatically copied to clipboard with the Copy button - The copied value can be used by pasting it into the Address field
Example Usage:
- Environment variable:
GRPC_BACKEND_URL = localhost:50051(for Development environment) - Environment variable:
GRPC_BACKEND_URL = grpc.example.com:443(for Production environment) - Value entered in Address field:
${GRPC_BACKEND_URL} - At runtime in Development environment:
localhost:50051 - At runtime in Production environment:
grpc.example.com:443
Routing Algorithm
Which algorithm to use among the algorithms that can be used for load balancing can be determined by the user.
| Algorithm | Description |
|---|---|
| Round Robin | Request messages are sent to addresses in the list in order. When the end of the list is reached, it returns to the beginning of the list and the same cycle continues. |
| Pick First | Request messages are routed to the first address in the list. |
Deleting Address
The address is deleted by selecting the Remove option from the dropdown menu at the end of the row of the address to be deleted.
At least one address is required for the API Proxy to route. Therefore, after deleting the last address, the save button becomes inactive and does not allow saving.
Connection Settings Configuration
The gRPC Connection Settings Definition Tab enables configuration of connections made over the gRPC protocol. This tab contains various parameters necessary to optimize the performance and security of connections. Below are the details of the settings in this tab.
The parameters used for connection settings configuration are shown below.
| Field | Description |
|---|---|
| Max Inbound Message Size (Max Inbound Message Size) | Determines the maximum message size that can be received from the client. |
| Max Inbound Metadata Size (Max Inbound Metadata Size) | Determines the maximum metadata size that can be received from the client. |
| Keep Alive Time (Keep Alive Time) | Sets the time elapsed to keep the connection alive. |
| Keep Alive Timeout (Keep Alive Timeout) | Determines the timeout of Keep Alive messages. |
| Keep Alive Without Calls (Keep Alive Without Calls) | Sets whether the connection will be kept alive without calls. |
| Channel Idle Timeout (Channel Idle Timeout) | Determines the idle time of the channel. |
| Per RPC Buffer Limit (Per RPC Buffer Limit) | Defines the buffer memory limit to be allocated for each RPC. |
| Max Retry Attempts (Max Retry Attempts) | Determines the maximum number of attempts for retry. |
| Max Hedged Attempts (Max Hedged Attempts) | Sets the maximum number of attempts when the same request is sent multiple times. |
| Max Trace Events (Max Trace Events) | Determines the maximum number of trace events. |
| Send User Agent to Backend (Send User Agent to Backend) | Information that User Agent information will be sent when sending request to Backend. When this option is enabled, the User-Agent value can be customized. |
| Disable SSL/TLS Validation (Disable SSL/TLS Validation) | This field is shown on the screen but is not applied to the gRPC connection. For gRPC, TLS is controlled only by Secure Connection Settings. |
Secure Connection Setting
When this setting is enabled, Apinizer connects to the backend gRPC service over TLS. When it is disabled, the connection is established without TLS (plaintext).
On a TLS connection, Apinizer presents the client certificate from the selected Keystore to the backend and verifies the backend certificate with the Truststore.
The parameters used for connection settings configuration are shown below.
| Field | Description |
|---|---|
| Keystore | The key store containing the client key and certificate presented to the backend. It should contain the client private key, the client certificate and the certificate chain (intermediate and root CA certificates, if any). For gRPC, a Keystore must be selected when Secure Connection is enabled; if none is selected or it cannot be found in the active environment, the connection cannot be established. |
| Truststore | Used to verify the backend server certificate. It should contain the root CA certificate of the target server and intermediate CA certificates (if any). If no Truststore is selected, the JVM's default trusted certificate store is used. A truststore is not a separate record type: your JKS/PKCS12 file is uploaded as a key store record under Secret → Key Stores, and that record is what you select here. |
| Skip SSL Verification (Skip SSL Verification) | Shown on the screen but not applied to the gRPC connection; the backend certificate is always verified with the Truststore (or the JVM default). |
| Supported Protocol List (Supported Protocol List) | Shown on the screen but not applied to the gRPC connection; the TLS version is determined by the gRPC client defaults. |
| Hostname Verifier Type (Hostname Verifier Type) | Shown on the screen but not applied to the gRPC connection. |
When Secure Connection settings are active, the existing "http connection pool" in routing, whose values are specified in environment settings, is disabled.