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 2019/11/01 03:23:00 UTC
[GitHub] [incubator-apisix] lilien1010 commented on a change in pull request
#775: bugfix: support more built-in parameters when set chash balancer
lilien1010 commented on a change in pull request #775: bugfix: support more built-in parameters when set chash balancer
URL: https://github.com/apache/incubator-apisix/pull/775#discussion_r341440117
##########
File path: doc/architecture-design-cn.md
##########
@@ -237,7 +237,7 @@ APISIX 的 Upstream 除了基本的复杂均衡算法选择外,还支持对上
|------- |-----|------|
|type |必需|`roundrobin` 支持权重的负载,`chash` 一致性哈希,两者是二选一的|
|nodes |必需|哈希表,内部元素的 key 是上游机器地址列表,格式为`地址 + Port`,其中地址部分可以是 IP 也可以是域名,比如 `192.168.1.100:80`、`foo.com:80`等。value 则是节点的权重,特别的,当权重值为 `0` 有特殊含义,通常代表该上游节点失效,永远不希望被选中。|
-|key |必需|该选项只有类型是 `chash` 才有效。根据 `key` 来查找对应的 node `id`,相同的 `key` 在同一个对象中,永远返回相同 id|
+|key |必需|该选项只有类型是 `chash` 才有效。根据 `key` 来查找对应的 node `id`,相同的 `key` 在同一个对象中,永远返回相同 id,目前支持的 Nginx 内置变量有 `uri, server_name, server_addr, request_uri, remote_port, remote_addr, query_string, host, hostname, arg_***`,其中 `arg_***` 是来自URL的请求参数,[Nginx 变量列表](http://nginx.org/en/docs/varindex.html)|
Review comment:
in our scenario , we build our IM APP through websocket,as statefull connection, it's better that same device connect to the same upstream server, so when connect to websocker server ,our URL is like `websocket.hellotalk.com/im?deviceid=67bdd1558911a3f1899867a1105a491c`
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services