I have a service that runs REST and gRPC servers on two different ports in a container. I want to be able to expose both the ports instead of running the same service twice one with gRPC and one with REST. Is there any solution?
Some notes about the services:
- Both REST and gRPC are started up when container is deployed.
- They have different startup logic
- When changes are made most of the time it affects both GRPC and REST.
- A majority of the code changed is in the services which both GRPC and REST use.
So having said this, should running the REST and gRPC separately makes more sense or have it in the same container. The other challenge is we want the gRPC server to be accessible only to internal services running that project and REST is accessible to public proxied via nginx server.
Please share your thoughts. Thanks!