How can I setup gRPC port?

Thanks for the article I understand better now.

It is not possible in our case to do that because there is a reverse proxy in front of your service, and we need to configure the application protocol per port.

If you configure HTTP, the reverse proxy will terminate http2 request and transform them into an HTTP/1.1 request. So it will not work with GRPC as it is http2 only.

If you configure GRPC as protocol, the reverse proxy will not transform http2 into http1, but it will ensure that the traffic is actually grpc over http2 and will not forward it if it is regular http.

So you have 2 solutions, either

  • create 2 services so they can both listen on the port 4000, as you do
  • or make start your grpc server on a different port