elasticsearch - 当 node.master=true 和 node.data=false 的节点没有被选为主节点时,它将承担什么任务?
问题描述
假设我的弹性搜索集群中有六个节点。
node1 : node.master = true, node.data = false
node2 : node.master = true, node.data = false
node3 : node.master = true, node.data = false
node4 : node.master = false, node.data = true
node5 : node.master = false, node.data = true
node6 : node.master = false, node.data = false
如果node1被选为主节点,我想知道node2和node3会承担什么任务?他们会闲着吗?
解决方案
Yes, they will remain mostly idle waiting their turn to be elected. They will observe all the changes to the cluster state so that when their turn comes to be elected master, they are ready to manage the cluster right away and this will happen transparently without you having to take any actions.
您可能认为这完全是对资源的浪费,但是您需要考虑到这一点,并考虑如果您只有一个主节点并且由于某种原因它失败了会发生什么情况,您的集群将变为红色并且不再起作用,直到您让主人重新启动并运行。
在这种情况下,您的企业会受到多大的影响和痛苦?如果您的集群不是业务关键的并且您可以接受一些停机时间,那么您绝对不需要两个让这两个符合条件的主节点启动并运行,但是由于主节点既不需要内存也不需要大的磁盘空间,额外的成本应该可以忽略不计。
推荐阅读
- gnuradio - 是否可以配置 gr-ieee-80211 wifi_rx 文件以接收更高级别的层?
- python - 使用 URL 将模型设置为 true 或 false
- dtrace - 为什么 arg0 可以在什么时候表明它是一个内核堆栈?
- r - 闪亮的应用程序数据范围规则是否适用于 ShinyProxy?
- flutter - 在 Flutter 中编码时如何在 Google Playstore 上查看我的应用程序的版本号?
- php - 如何拆分 wordpress the_content() ;分成几个部分
- javascript - 我们有 2 条线路。我们如何才能得到 2 行与 JavaScript 相交的点?
- mongodb - Go + MongoDB:多态查询
- php - PHP 使用 Intelephense 调用 mysqli 的正确方法
- javascript - 浏览器中的 OpenSSL - 需要从 .pem 获取私钥然后签名