TDengine
TDengine copied to clipboard
In a cluster environment, when the disk storage of the old node is nearly full, how can I control that data is saved only to the new node after a new node is added
请问社区版能否满足这种场景: 1.手动控制数据分配到各个节点的权重 2.添加新节点后,控制老节点不再继续保存数据仅对外提供查询功能
TDengine 2.x 有这个打分机制决定权重,可以 show scores\G;
查看各个节点的分数(大概就是 cpu 核数、vnode 个数等因素算的),服务会优先在分数低的 dnode 节点上建立 vnode(vgroup)。这个机制不能手动控制,但可手动迁移 vnode (balance 参数没开时),方法见手动迁移数据节点。
实际上如果旧节点写了很多数据,新增数据节点后,新数据基本是往新节点去写了 。如果集群 balance 也打开的话,除了以上机制,在不均衡的情况下还会自动迁移 vnode。
收到,非常感谢