GRPC reverse proxy using same port for multiple grpc host/ports

isuru nginx-forum at forum.nginx.org
Wed May 29 02:41:15 UTC 2019


Hi All,
I am trying to reverseproxy http2 base grpc using nginx.I attempted with
nginx port 9092 to proxy to singl e grpc host  port using a conf file inside
conf.d.

 map $http_upgrade $connection_upgrade {
    default upgrade;
    ''        close;
  }

  upstream sendssmgrpcservers {
    # The docker endpoint of your grpc servers, you can have multiple here
    server 10.2.4.25:6568;
    #server 10.2.4.200:6566;
  }

#upstream sendSSMgrpcservers {
#server 10.2.4.25:6568;
#}

  server {
    listen  9092  http2;
    location / {

      # The 'grpc://' prefix is optional; unencrypted gRPC is the default
      grpc_pass grpc://sendssmgrpcservers;
#grpc_pass grpc://10.2.4.226:6566;  
                                                             
}}

When I add another conf file for the same port with a  different domain name
in conf and to a different grpc host/port as upstream  It does not  forward
to right grpc host port.

Does http2 grpc reverseproxy not support multiple grpc host/port forward on
same port?If yes how to  configure that

Thanks
Isuru

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284344,284344#msg-284344



More information about the nginx mailing list