Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如果influxdb集群需要扩容,是需要做什么操作? #99

Open
feiguoL opened this issue Jan 14, 2020 · 1 comment
Open

Comments

@feiguoL
Copy link

feiguoL commented Jan 14, 2020

修改proxy.json,直接添加node? 有没有wiki参考,多谢!

@shell909090
Copy link
Owner

如果没有修改映射关系,只是新增节点,直接扩就行了。最后刷新一下各个机器上的配置,不需要停机。

如果修改了映射关系,新节点上不需要查询老数据,也是直接扩容。

新节点需要查询扩容前的数据,需要做数据迁移。具体方法如下:

  1. 先将新节点添加为write only。
  2. 等24小时后,新节点上会持续写入数据。
  3. 此时复制老节点上的数据文件到新节点(具体请参考influxdb自身的数据迁移过程)。新节点上即可查询出所有新老数据。
  4. 新节点去掉write only,老节点改为write only。
  5. 写入和查询一切正常的话,去掉老节点,删除老节点上的数据。

一般来说,集群修改映射关系是一个比较罕见的操作,因为带老数据操作比较麻烦。请谨慎考虑映射关系。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants