How gRPC Works Through the Gateway
gRPC services get special HTTP/2 treatment:- Add a
gsuffix to your port:<app-id>-<port>g.<cluster>.phala.network - Gateway detects the
gsuffix and enables HTTP/2 via ALPN negotiation - gRPC traffic flows over HTTP/2 with automatic TLS termination
- Your service handles standard gRPC calls without TLS configuration
g suffix enables HTTP/2 for any service, not just gRPC. You can use it for any HTTP/2-compatible application that benefits from multiplexing, server push, or header compression.
Deploy Your gRPC Service
<app-id>-50051g.dstack-prod5.phala.network:443
Note the g suffix - this tells the gateway to enable HTTP/2.
Connect from Clients
gRPC with Custom Domains
Use dstack-ingress for custom domains:api.mycompany.com. Learn more details at Set up custom domains.
Testing with grpcurl
Key Differences
gRPC (withg suffix):
- Native HTTP/2 with ALPN negotiation
- Optimal performance for gRPC protocols
- Proper streaming support
- Standard HTTP/1.1 or HTTP/2
- Best for REST APIs and web applications
- No gRPC-specific optimizations
Internal vs External
Troubleshooting
No HTTP/2 negotiation? Use theg suffix and verify ALPN support.
Connection refused? Check port mapping and service status.
TLS errors? Connect to port 443 with correct hostname.

