我在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
我在您的回复中没有看到此消息。相反,我看到“通过这种配置,您需要将您的查询指向三个节点节点中的一个节点,并将其停止,并将其导向另一个节点。” –