我在AWS上部署了3節點彈性搜索集羣。一個主節點和2個從節點。我所有的索引和搜索查詢都是針對master_IP:9200。我的問題是關於處理主節點關閉時的情況。我如何知道新的主節點?彈性搜索處理主/從關機
以下是我的集羣中的yaml文件。
站長:
#################################### Node #####################################
# Node names are generated dynamically on startup, so you're relieved
# from configuring them manually. You can tie this node to a specific name:
#
node.name: "Master_0"
path.data: "/mntebs/elasticsearch"
node.master: true
node.data: true
# Set the number of shards (splits) of an index (5 by default):
#
index.number_of_shards: 5
# Set the number of replicas (additional copies) of an index (1 by default):
#
index.number_of_replicas: 2
Slave_1:
#################################### Node #####################################
# Node names are generated dynamically on startup, so you're relieved
# from configuring them manually. You can tie this node to a specific name:
#
node.name: "Slave_0"
path.data: "/mntebs/elasticsearch"
node.master: false
node.data: true
# Set the number of shards (splits) of an index (5 by default):
#
index.number_of_shards: 5
# Set the number of replicas (additional copies) of an index (1 by default):
#
index.number_of_replicas: 1
Slave_2:
#################################### Node #####################################
# Node names are generated dynamically on startup, so you're relieved
# from configuring them manually. You can tie this node to a specific name:
#
node.name: "Slave_1"
path.data: "/mntebs/elasticsearch"
node.master: false
node.data: true
# Set the number of shards (splits) of an index (5 by default):
#
index.number_of_shards: 5
# Set the number of replicas (additional copies) of an index (1 by default):
#
index.number_of_replicas: 1
**請勿建議將請求發送到單個節點**,除非該節點是客戶端節點。該節點將會過載(CPU,內存,磁盤)。 –
我知道。這就是爲什麼我建議使用一些通常圍繞着請求的客戶端。 – bittusarkar
我在您的回覆中沒有看到此消息。相反,我看到「通過這種配置,您需要將您的查詢指向三個節點節點中的一個節點,並將其停止,並將其導向另一個節點。」 –