The analog to #727 for ClickHouse. We need to start ClickHouse in a multi-node cluster, rather than single-node. There are a few pieces to this:
- The existing merge-tree-based tables need to be moved to
ReplicatedMergeTree or a similar Replicated* variant. See this page for how to set up replication. Briefly, you name the table with a few well-known variables, like /clickhouse/tables/{shard}'. That key {shard}` is interpolated from the XML configuration file used to launch the DB itself. So we need a few different XML files (or a way to generate them), and the corresponding names in the SQL for creating the tables.
- We need to actually create distributed tables on top of the replicated ones. This is a bit confusing, but basically this allows making queries of a single distributed table, which then actually distributes the queries to all replicas and aggregates results. I'm not sure how that part works on insertion, I need to read that again.
The analog to #727 for ClickHouse. We need to start ClickHouse in a multi-node cluster, rather than single-node. There are a few pieces to this:
ReplicatedMergeTreeor a similarReplicated*variant. See this page for how to set up replication. Briefly, you name the table with a few well-known variables, like/clickhouse/tables/{shard}'. That key{shard}` is interpolated from the XML configuration file used to launch the DB itself. So we need a few different XML files (or a way to generate them), and the corresponding names in the SQL for creating the tables.