Skip to content

Initialize multi-node ClickHouse rather than single-node #2158

@bnaecker

Description

@bnaecker

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.

Metadata

Metadata

Assignees

Labels

databaseRelated to database accessmvp

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions