向 Cassandra 集群添加新节点

Adding new node to Cassandra cluster

我有一个 4 节点集群,将在两天内添加一个额外的节点。我们没有使用 vnode。

只是想知道完成后重新平衡集群的最佳方法。我是否只启动新节点然后启动 nodetool 移动?

或者我是否关闭每个节点,更改每个节点的 initial_token 值(使用其中一个生成器为我计算值)然后启动每个节点?

我只想知道从命令行执行此操作的最简单方法。新节点已经安装了 Cassandra,因为它最初是一个非生产服务器,我将从节点中删除数据并相应地更改配置文件以适应新集群,它现在将成为其中的一部分,只是不确定另一个步骤。

从这个页面 Adding or replacing single-token nodes 开始,最简单的机制是在 cassandra.yaml 中启动新节点并将其初始令牌留空。这将使集群 'split the token range of the heaviest loaded node and position the new node there'。这不会给你一个平衡的集群。

如果你想要一个平衡的集群,那么你必须经历你提到的节点工具移动、节点重启、节点工​​具清理过程。