Resource relationships in Managed Service for ClickHouse®
The main entity used in Managed Service for ClickHouse® is a database cluster.
Each cluster consists of one or more DB hosts, which are virtual machines with ClickHouse® DBMS servers deployed. Cluster hosts may reside in different availability zones and even different availability regions. You can learn more about Yandex Cloud availability zones in Platform overview.
A cluster with multiple ClickHouse® hosts is natively fault-tolerant because ClickHouse® hosts can step in for one another as the cluster’s primary replica. To manage replication and query distribution across ClickHouse® hosts, you can use either ZooKeeper hosts or ClickHouse® Keeper Depending on the selected tool, the cluster will consist of:
-
Only ClickHouse® hosts with ClickHouse® Keeper support
-
ClickHouse® hosts and individual ZooKeeper hosts
A cluster with a single ClickHouse® host is not fault-tolerant.
To implement fault-tolerance in an existing cluster with a single ClickHouse® host:
- Add at least three ZooKeeper hosts to the cluster to manage replication.
- Add ClickHouse® hosts to your cluster to distribute replicas among them.
This will make your cluster fault-tolerant.
When creating a cluster, specify:
-
Host class: VM template for deploying the cluster hosts. For a list of available host classes and their specs, see Host classes.
-
Environment: Environment where the cluster will be deployed:
PRODUCTION
: For stable versions of your apps.PRESTABLE
: For testing purposes. The prestable environment is similar to the production environment and likewise covered by the SLA, but it is the first to get new functionalities, improvements, and bug fixes. In the prestable environment, you can test compatibility of new versions with your application.
You should also specify the host class when creating a shard.
A cluster created in a folder can be accessed by all VMs connected to the same cloud network. For more information about networking, see the Virtual Private Cloud documentation.
Alert
The service can automatically access the system and diagnostic information of your databases to build monitoring charts and maintain your cluster health. The service never queries or uses the data you saved to the database.
ClickHouse® is a registered trademark of ClickHouse, Inc