Step by Step Clickhouse Cluster Installation with 3 Servers

HKN MZ
9 min readOct 17, 2022

Clickhouse supports distribution and replication of data, but the documentation around it is confusing and setting up a cluster is not straight forward.

I will use VMware Workstations servers(click1, click2 and click3). Operating System is Ubuntu 20.04.4 LTS (Focal Fossa) for all 3 servers(click1, click2 and click3) and Clickhouse version is 22.10.1.1160 for 2 servers (click2, click3).

Here is the Clickhouse Cluster Structure.

Cluster Structure

To build our cluster, we’re going to follow these main steps:

  • Install and Configure Zookeeper
  • Install and Configure Clickhouse for 2 nodes (click2, click3)
  • Test the Clickhouse Cluster
  • Create a sample Replicated table for Cluster

Install and Configure Zookeeper

ZooKeeper version 3.4.5 and greater is required for ClickHouse clusters. In this case, we’ll be installing the most current version from the Ubuntu repository, using the following command. Not: Just install Zookeeper for 1 node (click1)

--

--

HKN MZ
HKN MZ

Written by HKN MZ

I am writing about Sql Server, Elasticsearch and Python. İ am an Database Administrator on SQL Server and Elasticsearch more than 5+ years.

No responses yet