gRPC endpoint behind reverse proxy - non root path

38 views
Skip to first unread message

Iootu Iootu

unread,
Aug 4, 2022, 6:26:06 AMAug 4
to grpc.io

I’m currently developing a simple gRPC mock server that listens on the same port for both HTTP requests and gRPC (HTTP/2). The solution is not configured with TLS and is very similar to the one here.

This for local environment, works perfectly (for both the HTTP server and gRPC server). They are both accessible through localhost:8080. However, for productive environments we are using a reverse proxy approach, using HAProxy, and the service is then accessible via a non root path.

Which to me, it seems very similar to this post. So the question is, is this still not possible to be done?

Is routing traffic via subdomains still the only possible solution?

Thanks.

Sanjay Pujare

unread,
Aug 4, 2022, 1:05:18 PMAug 4
to Iootu Iootu, grpc.io
> ...So the question is, is this still not possible to be done?

Correct.

You can use the gRPC service name(s) and enumerate those service names in the reverse proxy to route gRPC traffic accordingly.

Alternatively your gRPC clients can use a different hostname (but the traffic arrives at the same reverse proxy) and the reverse proxy can route traffic based on the hostname.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/3c13dcf9-3a1a-41f0-8bcc-2730061f7f88n%40googlegroups.com.

Iootu Iootu

unread,
Aug 5, 2022, 6:40:16 AMAug 5
to grpc.io
Thanks for coming back to me in such a short time.

Very much appreciated.

Reply all
Reply to author
Forward
0 new messages