精华 clickhouse分布式集群如何进行扩展呢?
发布于 4 个月前 作者 fly9987 525 次浏览 来自 问答

在官方文档中,有提到如下语句:

The Distributed engine allows working with a cluster like a local server. However, the cluster is inextensible: you must write its configuration in the server config file (even better, for all the cluster’s servers). 集群式不能扩展的,这句话应该如何理解呢?

2 回复

简单实验了一下添加节点: 环境:6台数据服务器,MergeTree + Distributed。 过程:修改每台设备上的配置文件metrika.xml,在clickhouse_remote_servers下添加一个shard。 登录到新节点,建立相通的MergeTree + Distributed表。在Distributed表中可以查询到整个集群的数据~ 不能扩展,指的是不能自动扩展? 假如说我只配置了zookeeper,能否实现自动发现新节点并加入到clickhouse_remote_servers中呢?

在官方文档中,Configuration files小节里面有一段话:

You can also perform substitutions from ZooKeeper nodes. To do that add the from_zk="/path/to/node" attribute to a config element. Element contents will be substituted with the contents of the /path/to/node ZooKeeper node. The ZooKeeper node can contain a whole XML subtree, and it will be inserted as a child of the substituted node.

这句话应当如何理解呢?

回到顶部