Revolyssup commented on issue #11516:
URL: https://github.com/apache/apisix/issues/11516#issuecomment-2304105045

   Do you mean something like
   
   Client -> Apisix @ x:y -> mysql1
   Client -> Apisix @x:z -> mysql2 ?
   
   Then you can create two stream routes pointing to same upstream
   ```yaml
   apisix:
     stream_proxy: # TCP/UDP proxy
       tcp: # TCP proxy address list
         - x:y
         - x:z
   ```
   
   ```bash
   curl http://127.0.0.1:9180/apisix/admin/stream_routes/1 -H "X-API-KEY: 
$admin_key" -X PUT -d '
   {
       "server_addr": "x",
       "server_port": y,
       "upstream": {
           "nodes": {
               "mysql1 address": 1
           },
           "type": "roundrobin"
       }
   }'
   
   
   curl http://127.0.0.1:9180/apisix/admin/stream_routes/2 -H "X-API-KEY: 
$admin_key" -X PUT -d '
   {
       "server_addr": "x",
       "server_port": z,
       "upstream": {
           "nodes": {
               "mysql2 address": 1
           },
           "type": "roundrobin"
       }
   }'
   ```
   


-- 
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