sailershen edited a comment 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 127.0.0.1:6500, it's failed: ``` telnet 127.0.0.1 6500 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. Connection closed by foreign host. ``` -- 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: [email protected]
