Manage a ClickHouse® cluster

  1. Go to the Clusters overview page in the console.

  2. Select the cluster you want to manage.

  3. Click Edit in the upper-right corner of the page and configure resources:

    1. Under Resources:

      • Select a preset for CPU and RAM.

        A resource preset has the following structure:

        <CPU platform> - C<number of CPU cores> - M<number of gigabytes of RAM>
        

        There are three available CPU platforms:

        • g - ARM Graviton

        • i - Intel (x86)

        • s - AMD (x86)

        For example, the i1-c2-m8 preset means that it's an Intel platform 2-core CPU with 8 gigabytes of RAM.

        You can see the availability of CPU platforms across our Managed Service for ClickHouse® areas and regions.

      • Specify your SSD Storage capacity.

        Note

        After you have created a cluster, you can only increase the storage capacity. You can't decrease the storage capacity.

        When you increase your storage capacity, it's available for use immediately after you submit the new configuration. However, the whole process of modifying your storage volume may take from minutes to hours, depending on the volume increase applied. For example, a volume of 1 TB in size typically takes up to 6 hours to modify.

        Warning

        After you increase your SSD Storage capacity, please wait at least six hours per 1 TB to modify it again.

      • Choose a number of Replicas. Selecting two or three replicas will double or triple the number of hosts per shard, respectively.

      • Select a number of Shards.

        Have at least two shards on your cluster to use all the benefits of sharding.

        Using a distributed table and a single shard is equivalent to using replication with no sharding. It protects against data loss when one or more replica hosts fail but provides no distributed data storage and doesn't improve query performance.

    Warning

    Be aware when you lower the number of existing replicas - under certain conditions, this may lead to data loss.

  4. Under Advanced:

    • Under Maintenance settings, select the scheduling type:

      • Arbitrary to delegate maintenance window selection to DoubleCloud. Usually, your cluster will perform maintenance procedure at the earliest available time slot.

        Warning

        We suggest not to use this scheduling type with single-host clusters, as it can lead to your cluster becoming unavailable at random.

      • By schedule to set the weekday and time (UTC) when DoubleCloud may perform maintenance on your cluster.

    Note

    You can't change the configuration of ClickHouse Keeper hosts after the cluster has been created.

  5. Under Cluster settings:

    • Specify or adjust your cluster's DBMS settings. For more information, see the Settings reference.
  6. Click Submit.

To manage a ClickHouse® cluster, use the ClusterService update method with the cluster_id parameter.

To find the cluster_id, get a list of clusters in the project.

See also