You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/12/06 15:38:47 UTC

[GitHub] [apisix] zbh0323 opened a new issue, #8464: How to route to different grpc service by path?

zbh0323 opened a new issue, #8464:
URL: https://github.com/apache/apisix/issues/8464

   ### Description
   
   I have a question that about routing to grpc service.
   I want to be able to distinguish different grpc services by different path prefixes.
   I run failed on ingress-nginx just like this conf
   `
   apiVersion: extensions/v1beta1
   kind: Ingress
   metadata:
     annotations:
       kubernetes.io/ingress.class: "nginx"
       nginx.ingress.kubernetes.io/ssl-redirect: "true"
       nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
     name: grpc-ingress
     namespace: default
   spec:
     rules:
     - host: grpc.hello.com
       http:
         paths:
         - path: /service.foo.Greeter
           backend:
             serviceName: foo-service
             servicePort: grpc
          - path: /service.bar.Greeter
           backend:
             serviceName: bar-service
             servicePort: grpc
   `
   I wonder if apisix has some solution or maybe it out of reach,I've also seen the grpc-web design, but that's not the way I want it
   
   
   ### Environment
   
   - APISIX version (run `apisix version`):2.15.0
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):openresty/1.21.4.1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zbh0323 commented on issue #8464: How to route to different grpc service by path?

Posted by GitBox <gi...@apache.org>.
zbh0323 commented on issue #8464:
URL: https://github.com/apache/apisix/issues/8464#issuecomment-1340299362

   > Not so clear for your case. Do you want a grpc proxy or translating http to grpc or vice versa.
   > 
   > If you want a proxy, if you know the way grpc concatenates service and methods to a URI path, then you know how to write apisix routes.
   
   I looked through the apisix documentation and found that the proxy of grpc still relies on the host, that is, the proxy of the server name. I want to know whether grpc has a method similar to http, and uses the path to provide grpc services that cannot be proxied.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] zbh0323 commented on issue #8464: How to route to different grpc service by path?

Posted by GitBox <gi...@apache.org>.
zbh0323 commented on issue #8464:
URL: https://github.com/apache/apisix/issues/8464#issuecomment-1340305728

   > Not so clear for your case. Do you want a grpc proxy or translating http to grpc or vice versa.
   > 
   > If you want a proxy, if you know the way grpc concatenates service and methods to a URI path, then you know how to write apisix routes.
   
   Just like this
   
   
   grpc:
     - name: grpc
       priority: 3
       match:
         paths:
           - /{{ .Release.Name }}/grpc/*
       backends:
         - serviceName: {{ .Release.Name }}
           servicePort: grpc
       plugins:
         - name: proxy-rewrite
           enable: true
           config:
             regex_uri: ["^/{{ .Release.Name }}/grpc/(.*)", "/$1"]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tokers commented on issue #8464: How to route to different grpc service by path?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8464:
URL: https://github.com/apache/apisix/issues/8464#issuecomment-1340212371

   Not so clear for your case. Do you want a grpc proxy or translating http to grpc or vice versa.
   
   If you want a proxy, if you know the way grpc concatenates service and methods to a URI path, then you know how to write apisix routes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to route to different grpc service by path? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8464:
URL: https://github.com/apache/apisix/issues/8464#issuecomment-1845045479

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to route to different grpc service by path? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8464: How to route to different grpc service by path?
URL: https://github.com/apache/apisix/issues/8464


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to route to different grpc service by path? [apisix]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8464:
URL: https://github.com/apache/apisix/issues/8464#issuecomment-1822460828

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org