zwtesttt commented on issue #11405:
URL: https://github.com/apache/apisix/issues/11405#issuecomment-2230279845

   
   
![image](https://github.com/user-attachments/assets/6fbd4030-2058-4f07-974e-9023608271b3)
   
   I tried in APISIX 3.5.1 and it is possible to proxy both HTTP and gRPC 
requests on the same port. You can check if this is the functionality you are 
looking for.
   `apisix.yaml`:
   ```
   routes:
     -
       uri: "/*"
       name: "111"
       methods:
         - "POST"
         - "GET"
       upstream:
         nodes:
           - host: "192.168.31.158"
             port: 50051
             weight: 1
         type: "roundrobin"
         hash_on: "vars"
         scheme: "grpc"
         pass_host: "pass"
       status: 1
     -
       uri: "/test"
       name: "test-route"
       methods:
         - "POST"
         - "GET"
       upstream:
         nodes:
           - host: "192.168.31.158"
             port: 888
             weight: 1
         type: "roundrobin"
         hash_on: "vars"
         scheme: "http"
         pass_host: "pass"
       status: 1
   
   services:
     -
       id: 1
       upstream_id: anything_upstream
   
   upstreams:
     -
       id: "anything_upstream"
       nodes:
         "httpbin.org:80": 1
       type: roundrobin
   #END
   ```
   `config.yaml`:
   ```
   apisix:
     enable_http2: true
   deployment:
     role: data_plane
     role_data_plane:
       config_provider: yaml
   
   #END
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to