关于influxdb:InfluxDB集群-节点部署过程

1次阅读

共计 1000 个字符,预计需要花费 3 分钟才能阅读完成。

如果集群节点较少,一个 node 会同时负责 meta 和 data,node 上部署的过程同时具备 meta 和 data 的治理性能。

启动参数

对于 3 节点的 InfluxDB 集群,其启动参数:

//ops1 节点
# influxd -config /etc/influxdb/influxdb.conf -join ops1:8091,ops2:8091,ops3:8091 --hostname ops1

//ops2 节点
# influxd -config /etc/influxdb/influxdb.conf -join ops1:8091,ops2:8091,ops3:8091 --hostname ops2

//ops3 节点
# influxd -config /etc/influxdb/influxdb.conf -join ops1:8091,ops2:8091,ops3:8091 --hostname ops3

启动结束后,应用集群治理命令,能够查问以后集群的节点:

# influxd_ctl show-nodes
============Meta Nodes============
ID      Host            TCPHost
1       ops2:8091       ops2:8088
2       ops3:8091       ops3:8088
3       ops1:8091       ops1:8088

============Data Nodes============
ID      Host    TCPHost

能够看到,meta nodes 均已被辨认。

增加 data nodes

在其中一个节点上执行:

# influxd_ctl add-data ops1:8088
# influxd_ctl add-data ops2:8088
# influxd_ctl add-data ops3:8088

再查问集群中以后节点:

# influxd_ctl show-nodes
============Meta Nodes============
ID      Host            TCPHost
1       ops2:8091       ops2:8088
2       ops3:8091       ops3:8088
3       ops1:8091       ops1:8088

============Data Nodes============
ID      Host                    TCPHost
1       178.104.163.69:8086     ops2:8088
2       178.104.163.239:8086    ops3:8088
3       178.104.163.205:8086    ops1:8088

能够看到,data-nodes 均已退出集群。

正文完
 0