diaosj opened a new issue #3546:
URL: https://github.com/apache/apisix/issues/3546
### Issue description
Set two nodes to an upstream. Suppose they are `NodeA` and `NodeB`.
Upstream JSON is like this:
```
{"header":{"revision":"10298","cluster_id":"17817882145681418091","raft_term":"2","member_id":"12344213989818773070"},"count":"1","node":{"modifiedIndex":8878,"value":{"pass_host":"pass","nodes":{"NodeA":100,"NodeB":0},"desc":"","type":"roundrobin","create_time":1611630417,"name":"aplusb-demo-online-service","update_time":1611648368,"id":"aplusb-demo-online-service","hash_on":"vars","enable_websocket":false},"createdIndex":8875,"key":"\/apisix\/upstreams\/aplusb-demo-online-service"},"action":"get"}
```
Notice that the weight of `NodeA` is set to 100 and the weight of `NodeB` is
set to 0.
When `NodeB` is destroyed, I found that the API call fails. Error message in
`error.log` says:
```
parse_domain(): failed to parse domain: <NodeB>, error: server returned
error code: 3: name error...
```
Then I weed out the offline `NodeB`, the API call succeeds.
I'm confused. The weight of `NodeB` is set to 0, why this node still causes
a 5xx error? Maybe we need a document to explain this to other users.
### Environment
* apisix version (cmd: `apisix version`): 2.1
* OS (cmd: `uname -a`): Linux
* OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
openresty/1.19.3.1
* etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
* apisix-dashboard version, if have:
----------------------------------------------------------------
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]