Работающий кластер
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
<clickhouse>
|
||||
<users>
|
||||
<default>
|
||||
<password>123456</password>
|
||||
</default>
|
||||
</users>
|
||||
</clickhouse>
|
||||
@@ -0,0 +1,20 @@
|
||||
global
|
||||
maxconn 4096
|
||||
log stdout format raw local0
|
||||
|
||||
defaults
|
||||
mode tcp
|
||||
timeout connect 10s
|
||||
timeout client 1m
|
||||
timeout server 1m
|
||||
|
||||
frontend clickhouse_front
|
||||
bind *:8123
|
||||
default_backend clickhouse_back
|
||||
|
||||
backend clickhouse_back
|
||||
balance roundrobin
|
||||
server clickhouse1 click1:8123 check
|
||||
server clickhouse2 click2:8123 check
|
||||
server clickhouse3 click3:8123 check
|
||||
server clickhouse4 click4:8123 check
|
||||
@@ -0,0 +1,10 @@
|
||||
<clickhouse>
|
||||
<macros>
|
||||
<shard_c1sh4rep>01</shard_c1sh4rep>
|
||||
<shard_c2sh2rep>01</shard_c2sh2rep>
|
||||
<shard_c4sh1rep>01</shard_c4sh1rep>
|
||||
<replica_c1sh4rep>rep1</replica_c1sh4rep>
|
||||
<replica_c2sh2rep>rep1</replica_c2sh2rep>
|
||||
<replica_c4sh1rep>rep1</replica_c4sh1rep>
|
||||
</macros>
|
||||
</clickhouse>
|
||||
@@ -0,0 +1,10 @@
|
||||
<clickhouse>
|
||||
<macros>
|
||||
<shard_c1sh4rep>01</shard_c1sh4rep>
|
||||
<shard_c2sh2rep>01</shard_c2sh2rep>
|
||||
<shard_c4sh1rep>02</shard_c4sh1rep>
|
||||
<replica_c1sh4rep>rep2</replica_c1sh4rep>
|
||||
<replica_c2sh2rep>rep2</replica_c2sh2rep>
|
||||
<replica_c4sh1rep>rep1</replica_c4sh1rep>
|
||||
</macros>
|
||||
</clickhouse>
|
||||
@@ -0,0 +1,10 @@
|
||||
<clickhouse>
|
||||
<macros>
|
||||
<shard_c1sh4rep>01</shard_c1sh4rep>
|
||||
<shard_c2sh2rep>02</shard_c2sh2rep>
|
||||
<shard_c4sh1rep>03</shard_c4sh1rep>
|
||||
<replica_c1sh4rep>rep3</replica_c1sh4rep>
|
||||
<replica_c2sh2rep>rep1</replica_c2sh2rep>
|
||||
<replica_c4sh1rep>rep1</replica_c4sh1rep>
|
||||
</macros>
|
||||
</clickhouse>
|
||||
@@ -0,0 +1,10 @@
|
||||
<clickhouse>
|
||||
<macros>
|
||||
<shard_c1sh4rep>01</shard_c1sh4rep>
|
||||
<shard_c2sh2rep>02</shard_c2sh2rep>
|
||||
<shard_c4sh1rep>04</shard_c4sh1rep>
|
||||
<replica_c1sh4rep>rep4</replica_c1sh4rep>
|
||||
<replica_c2sh2rep>rep2</replica_c2sh2rep>
|
||||
<replica_c4sh1rep>rep1</replica_c4sh1rep>
|
||||
</macros>
|
||||
</clickhouse>
|
||||
@@ -0,0 +1,48 @@
|
||||
<clickhouse>
|
||||
<remote_servers replace="true">
|
||||
<!-- 1 shards 4 replicas -->
|
||||
<c1sh4rep>
|
||||
<shard>
|
||||
<internal_replication>true</internal_replication>
|
||||
<replica><host>click1</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
<replica><host>click2</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
<replica><host>click3</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
<replica><host>click4</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
</c1sh4rep>
|
||||
<!-- 4 shards 1 replicas -->
|
||||
<c4sh1rep>
|
||||
<shard>
|
||||
<replica><host>click1</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
<shard>
|
||||
<replica><host>click2</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
<shard>
|
||||
<replica><host>click3</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
<shard>
|
||||
<replica><host>click4</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
</c4sh1rep>
|
||||
<!-- 2 shards 2 replicas -->
|
||||
<c2sh2rep>
|
||||
<shard>
|
||||
<internal_replication>true</internal_replication>
|
||||
<replica><host>click1</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
<replica><host>click2</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
<shard>
|
||||
<internal_replication>true</internal_replication>
|
||||
<replica><host>click3</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
<replica><host>click4</host><port>9000</port><user>default</user><password>123456</password></replica>
|
||||
</shard>
|
||||
</c2sh2rep>
|
||||
</remote_servers>
|
||||
<zookeeper>
|
||||
<node index="1">
|
||||
<host>zookeeper</host>
|
||||
<port>2181</port>
|
||||
</node>
|
||||
</zookeeper>
|
||||
</clickhouse>
|
||||
Reference in New Issue
Block a user