elasticsearch - Elasticsearch 7.3 Rest客户端是否发现新节点?

标签 elasticsearch deployment load-balancing haproxy high-availability

我有一个带有3个节点的Elasticsearch 7.3集群。
我的应用程序正在使用es rest客户端以便与es通信。客户端使用的连接URL为 node1:node2:node3

我的问题-是否可以将新的 node4 添加到es群集,以便其余客户端发现它(当然,无需重新启动应用程序)?也许其余的调用将到达node1,它将以某种方式将其重定向到新添加的节点。

ps。我开始考虑上述问题-是否需要在客户端和es群集之间使用LB还是不需要...

最佳答案

在es文档中找到了答案。

Once a RestClient instance has been created, a Sniffer can be associated to it. The Sniffer will make use of the provided RestClient to periodically (every 5 minutes by default) fetch the list of current nodes from the cluster and update them by calling RestClient#setNodes.



链接到文档-rest client usage, sniffer

关于elasticsearch - Elasticsearch 7.3 Rest客户端是否发现新节点?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59047106/

相关文章:

java - ElasticSearch 2.2.0 - ESIntegTestCase - 在搜索中执行 groovy 脚本时出现 ClassNotFoundException

Azure - 静态 HTML/CSS/JS 作为 Web 应用程序中的虚拟目录

tomcat - 什么会导致 EC2 实例无法添加到 Elastic Load Balancer/健康检查失败?

algorithm - 在一组服务器之间分配请求的最佳负载平衡算法?

load-balancing - 一个域名 "load balanced"跨越 Google Compute Engine 中的多个区域

spring - 如何在Spring应用程序中附加Elastic APM

elasticsearch - 对数组对象进行 Elasticsearch 匹配查询

elasticsearch - 替换字段名称中的点

并行部署期间 Tomcat 性能下降

Javascript 在错误后继续运行代码