Managing ClickHouse cluster hosts
You can add and remove cluster hosts.
Warning
You cannot edit existing hosts.
Warning
Before adding new hosts to any of the shards, enable fault tolerance using ZooKeeper hosts.
Getting a list of cluster hosts
- Go to the folder page
and select Managed Service for ClickHouse. - Click the name of the cluster and select the Hosts tab.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To get a list of cluster hosts, run the command:
ncp managed-clickhouse host list \
--cluster-name=<cluster name>
Result:
+---------------------------+--------------+---------+--------+-------------+
| NAME | CLUSTER ID | ROLE | HEALTH | ZONE ID |
+---------------------------+--------------+---------+--------+-------------+
| en1...mdb.nemax.nebius.cloud | c9qp71dk1... | MASTER | ALIVE | eu-north1-c |
| en1...mdb.nemax.nebius.cloud | c9qp71dk1... | REPLICA | ALIVE | eu-north1-c |
+---------------------------+--------------+---------+--------+-------------+
The cluster name can be requested with a list of clusters in the folder.
Adding a host
The number of hosts in Managed Service for ClickHouse clusters is limited by the CPU and RAM quotas available to DB clusters in your cloud. To check the resources in use, open the quotas page in the management console and find Managed Databases.
-
Go to the folder page
and select Managed Service for ClickHouse. -
Click the cluster name and go to the Hosts tab.
-
Click
-
Specify the host parameters:
- Availability zone.
- Subnet.
- Select Public access if the host must be accessible from outside Nebius AI.
- Name of the shard.
- Select the Copy data schema option to copy the schema from a random replica to the new host.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To add a host to a cluster:
-
Request a list of cluster subnets to select one for the new host:
ncp vpc subnet list
-
View a description of the CLI command for adding a host:
ncp managed-clickhouse host add --help
-
Run the add host command:
ncp managed-clickhouse host add \ --cluster-name=<cluster name> \ --host zone-id=<availability zone>,` `subnet-id=<subnet ID>,` `assign-public-ip=<public access to host: true or false>,` `shard-name=<shard name>,` `type=clickhouse
To copy the data schema from a random replica to the new host, set the
--copy-schema
optional parameter.Managed Service for ClickHouse will run the add host operation.
The subnet ID should be specified if the availability zone contains multiple subnets, otherwise Managed Service for ClickHouse automatically selects a single subnet. The cluster name can be requested with a list of clusters in the folder.
Warning
Use the copy data schema option only if the schema is the same on all replica hosts of the cluster.
Removing a host
You can remove a host from a ClickHouse cluster if it contains three or more hosts.
- Go to the folder page
and select Managed Service for ClickHouse. - Click the cluster name and open the Hosts tab.
- Click
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To remove a host from the cluster, run:
ncp managed-clickhouse host delete <hostname> \
--cluster-name=<cluster name>
The host name can be requested with a list of cluster hosts, and the cluster name can be requested with a list of clusters in the folder.