Support custom path prefix in gRPC service URL
See original GitHub issueIs your feature request related to a problem? Yes
The ask here is related to the following issue: https://github.com/grpc/grpc/issues/14900 We have following usecase:
We have multiple instances of the same gRPC server app running on multiple k8s deployments. Our routing model from gRPC client to gRPC servers is not direct but rather using Ingress with rerouting based on path
myserver/path1/myApi/call1 goes to instance1 myserver/path2/myApi/call1 goes to instance2 … myserver/pathN/myApi/call1 goes to instanceN
Now that nginx supports gRPC routing, this seems trivial to set up from the routing side. Alas, it does not seem to work. Since gRPC target and subsequently authority take only host:port into consideration
Number of destination servers is not finite as those come and go, so it’s not possible to have static Ingress spec
Possibly this is a gRPC client limitation?
Describe the solution you’d like
What we’d like to have is a way to specify path
part in the target or any other header that will allow to produce HTTP2 URI that can be rerouted finalDestinationServer/myApi/call1
Describe alternatives you’ve considered
use REST instead of gRPC
Additional context
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I don’t have any snippet for k8s.
We are using Java for client and most likely Python for server
I see. So eventually it’s k8s setup of a proxy that would need to be header based If you have any Java example of the client and respective k8s setup - it would be great! (if you have it handy)