需要使用nginx做高可用
1. nginx配置参考 :
upstream ck{
# 8213 http端口
server 192.168.10.202:8123 weight=1 max_ fails=3 fail_ timeout=60s;
server 192.168.10.203:8123 weight=1 max_ fails=3 fail_ timeout=60s;
server 192.168.10.204:8123 weight=1 max_ fails=3 fail_ timeout=60s;
}
server {
listen 18123;
proxy_ pass ck;
}
2. 产品中 通过jdbc协议连接代理服务器
jdbc:clickhouse://代理ip:代理port ...
查看完整内容