-
Notifications
You must be signed in to change notification settings - Fork 557
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
BalancedClickhouseDataSource; 负载均衡在0.3.2版本怎么支持以及后面版本怎么规划的的这个功能是? #834
Comments
Since the driver uses http protocol by default, I'd suggest you using middleware like As to the driver itself, I hope to re-write // Java client
ClickHouseNode server1 = ClickHouseNode.of(...);
ClickHouseCluster cluster1 = ClickHouseCluster.of("cluster1", server1); // discover the rest nodes of cluster1
ClickHouseNodes nodes = ClickHouseNodes.of(server1, cluster1, ...); // list of nodes may or may not belong to a cluster
ClickHouseResponse resp = client.connect(nodes) // intention to connect to a node within the list
.query("select 1")
.execute() // pick one node from nodes and execute from there
.get();
// JDBC driver will support multiple hosts(and protocols) in connection string like:
// jdbc:ch://ip1:port1,ip2:port2,.../database |
thanks |
现在 0.3.1 使用的 BalancedClickhouseDataSource。如果升级到 0.3.2版本,对应的 BalancedClickhouseDataSource应该替换成什么?是替换成clickhouse-client 模块下面ClickHouseCluster 对吧。 |
Sorry I'll write a guide for upgrading legacy JDBC driver to new one.
As I mentioned here, we'll only need to specify multiple hosts in connection string.
Correct. You may refer to the class diagram at here. By the way, |
ru.yandex.clickhouse.BalancedClickhouseDataSource; 负载均衡在0.3.2版本怎么支持以及后面版本怎么规划的的这个功能是?
The text was updated successfully, but these errors were encountered: