You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/09/09 10:40:43 UTC

[GitHub] [apisix] spacewander commented on issue #5026: bug: upstream admin api doc or upstream.lua's bug?

spacewander commented on issue #5026:
URL: https://github.com/apache/apisix/issues/5026#issuecomment-915970808


   PATCH request should merge new fields to hash. Otherwise, the other fields in upstream will be removed, as upstream is a hash. Since the nodes field is hash too, it looks like there is no way to override it.
   
   However, you can switch the nodes to an array format:
   ```
   "nodes": [
               {"host": "127.0.0.1", "port": 1980, "weight": 2000},
               {"host": "127.0.0.2", "port": 1980, "weight": 1, "priority": -1}
   ]
   ```
   
   What about your guys' opinion?
   @membphis @tzssangglass 


-- 
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: notifications-unsubscribe@apisix.apache.org

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