sailershen commented on issue #3843:
URL: https://github.com/apache/apisix/issues/3843#issuecomment-803712314


   Thx.
   Now I try to use "remote_addr".
   ```
   # node 1
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
       "remote_addr": "127.0.0.1",
       "upstream": {
           "nodes": {
               "172.16.10.241:6500": 1
           },
           "type": "roundrobin"
       }
   }'
   ```
   
   ```
   # node 2
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/2 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2' -X PUT -d '
   {
       "remote_addr": "127.0.0.1",
       "upstream": {
           "nodes": {
               "172.16.10.242:6500": 1
           },
           "type": "roundrobin"
       }
   }'
   ```
   
   Show the stream_routes:
   ```
   curl http://127.0.0.1:9080/apisix/admin/stream_routes/ -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f2'
   ```
   
   Output:
   `
   
{"count":"3","node":{"key":"\/apisix\/stream_routes","nodes":[{"createdIndex":8533,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.241:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"1"},"modifiedIndex":8533,"key":"\/apisix\/stream_routes\/1"},{"createdIndex":8534,"value":{"remote_addr":"127.0.0.1","upstream":{"pass_host":"pass","nodes":{"172.16.10.242:6500":1},"scheme":"http","hash_on":"vars","type":"roundrobin"},"id":"2"},"modifiedIndex":8534,"key":"\/apisix\/stream_routes\/2"}],"dir":true},"action":"get"}
   `
   
   But when I telnet to node 1 or to


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

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


Reply via email to