gRPC Proxy

    • : the scheme of the route’s upstream must be grpc or grpcs.

    create proxying gRPC route

    Here’s an example, to proxying gRPC service by specified route:

    • attention: the of the route’s upstream must be grpc or grpcs.
    • attention: APISIX use TLS‑encrypted HTTP/2 to expose gRPC service, so need to
    • attention: APISIX also support to expose gRPC service with plaintext HTTP/2, which does not rely on TLS, usually used to proxy gRPC service in intranet environment

    testing HTTP/2 with TLS‑encrypted

    Invoking the route created before:

    This means that the proxying is working.

    testing HTTP/2 with plaintext

    By default, the APISIX only listens to 9443 for TLS‑encrypted HTTP/2. You can support HTTP/2 with plaintext via the node_listen section under in conf/config.yaml:

    This means that the proxying is working.

    gRPCS

    If your gRPC service encrypts with TLS by itself (so called gPRCS, gPRC + TLS), you need to change the scheme to grpcs. The example above runs gRPCS service on port 50052, to proxy gRPC request, we need to use the configuration below: