anjia0532 commented on issue #6105:
URL: https://github.com/apache/apisix/issues/6105#issuecomment-1012895362


   > > 同key数据结构不一致,常见的比如 node.nodes 
无值{},有值[],更奇葩的是upstream的node.nodes[].nodes,通过接口更新的是{},通过dashboard更新的是[{},{}],就很难受
   > 
   > Could you provide detailed steps to reproduce it?
   > 
   > It's a bit weird in this case, because both `{}` and `[]` are valid 
`nodes` values. The array format is preferable, because:
   > 
   > 1. it can be PATCHed
   > 2. it is extendable
   
   > Could you provide detailed steps to reproduce it?
   
   My env `apache/apisix:2.9-alpine`  and `apache/apisix-dashboard:2.8`
   
   ref doc 
[docs/apisix/admin-api/#request-body-parameters-3](https://apisix.apache.org/docs/apisix/admin-api/#request-body-parameters-3)
 
   `nodes`'s Description:  `Hash table or array. If it is a hash table, the key 
of the internal element is the upstream machine address list, the format is 
Address + (optional) Port, where the address part can be IP or domain name, 
such as 192.168.1.100:80, foo.com:80, etc. The value is the weight of node. If 
it is an array, each item is a hash table with key host/weight and optional 
port/priority. The nodes can be empty, which means it is a placeholder and will 
be filled later. Clients use such an upstream will get 502 response.` means  `{ 
"ip:port": weight} or [{"host":"", "weight ":1, "port":80}]` 


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