每个节点都必须标有区域属性——但如何标记?
Each node must be labeled with a zone attribute - but how?
我在每个区域(2 个区域)中有 3 个节点,所有节点都列在 _membership 中。
[cluster]
q=3
r=2
w=2
n=3
z=2
placement = az1:3,az2:3
我无法使用 PUT/POST 命令来 运行 标记具有区域属性的节点。以下是来自文档:
First, each node must be labeled with a zone attribute. This defines which zone each node is in. You do this by editing the node’s document in the /nodes database, which is accessed through the “back-door” (5986) port. Add a key value pair of the form:
"zone": "metro-dc-a"
如有任何帮助,我将不胜感激。
文档的这一点4.4.4. Specifying database placement定义了设置节点区域的机制。
curl -X PUT http://localhost:5986/_nodes/<node-name> \
-d '{ \
"_id": "<node-name>",
"_rev": "<rev>",
"zone": "<zone-name>"
}'
我在每个区域(2 个区域)中有 3 个节点,所有节点都列在 _membership 中。
[cluster]
q=3
r=2
w=2
n=3
z=2
placement = az1:3,az2:3
我无法使用 PUT/POST 命令来 运行 标记具有区域属性的节点。以下是来自文档:
First, each node must be labeled with a zone attribute. This defines which zone each node is in. You do this by editing the node’s document in the /nodes database, which is accessed through the “back-door” (5986) port. Add a key value pair of the form:
"zone": "metro-dc-a"
如有任何帮助,我将不胜感激。
文档的这一点4.4.4. Specifying database placement定义了设置节点区域的机制。
curl -X PUT http://localhost:5986/_nodes/<node-name> \
-d '{ \
"_id": "<node-name>",
"_rev": "<rev>",
"zone": "<zone-name>"
}'