Help Center/ CloudTable Service/ Billing/ Billing Examples/ ClickHouse Billing Examples
Updated on 2024-05-13 GMT+08:00

ClickHouse Billing Examples

A user purchased a pay-per-use ClickHouse cluster on March 18, 2023, 15:00:00 and used the cluster for one hour. After 0.5 hour, the user changed the specifications of the ClickHouse node from 4 vCPUs and 16 GB memory to 8 vCPUs and 32 GB memory. The user changed the cluster to yearly/monthly on March 18, 2023, 15:59:59 for a long-term use. The validity period was one month, and the cluster expired at 23:59:59 on April 18, 2023. This section shows how to count the total fee for using this cluster. Suppose the cluster specifications are as follows:

  • Compute node specifications
    • Compute: 8U32G
    • Storage: High I/O and 500 GB/Node
    • Nodes: 2
  • ZooKeeper node specifications
    • Compute: 4U16G
    • Storage: Ultra-high I/O and 100 GB/Node
    • Nodes: 3 (This is a default value and cannot be changed.)

Billing Analysis

Based on this example, you can calculate the consumption before and after the specification change.

Table 1 Billing change details

Billing Mode

Formula

Billing Cycle

Price

Pay-per-use billing (before specification change)

Compute unit fee: Unit price of a compute unit x Number of nodes

Hourly fee

Compute nodes: 0.7072 (Unit price of a compute unit: USD/hour) x 2 (Node quantity) x 1 (Usage duration: hour) = $1.4144 USD

ZooKeeper nodes: 0.3536 (Unit price of a compute unit: USD/hour) x 3 (Node quantity) x 1 (Usage duration: hour) = $1.0608 USD

Disk fee: Disk unit price x Capacity x Number of nodes

Compute nodes: 0.0001 (Unit price of a disk: USD/hour) x 500 (Disk capacity: GB) x 2 (Node quantity) x 0.5 (Usage duration: hour) = $0.05 USD

ZooKeeper node disk fee: 0

Total fee: $2.5252 USD

Pay-per-use billing (after specification change)

Compute unit fee: Unit price of a compute unit x Number of nodes

Hourly fee

Compute nodes: 0.7072 (Unit price of a compute unit: USD/hour) x 2 (Node quantity) x 1 (Usage duration: hour) = $1.4144 USD

ZooKeeper nodes: 0.7072 (Unit price of a compute unit: USD/hour) x 3 (Node quantity) x 1 (Usage duration: hour) = $2.1216 USD

Disk fee: Disk unit price x Capacity x Number of nodes

Compute nodes: 0.0001 (Unit price of a disk: USD/hour) x 500 (Disk capacity: GB) x 2 (Node quantity) x 1 (Usage duration: hour) = $0.10 USD

ZooKeeper node disk fee: 0

Total price: $3.636 USD

Yearly/Monthly billing

Compute unit fee: Unit price of a compute unit x Number of nodes

Monthly fee

Compute nodes: $336.32 (Unit price of a compute unit: USD/month) x 2 (Node quantity) = $672.64 USD

ZooKeeper nodes: 336.32 (CU unit price: ¥/month) x 3 (nodes) = $1008.96 USD

Disk fee: Disk unit price x Capacity x Number of nodes

Compute nodes: 0.05 (Unit price of a disk: USD/hour) x 500 (Disk capacity: GB) x 2 (Node quantity) = $50 USD

ZooKeeper node disk fee: 0

Total

Total fee: $1731.60 USD

  • ClickHouse clusters are charged by hour. The smallest billing unit for compute unit usage is one hour, and partial hours are counted as full hours.
  • Periodic Settlement of Pay-per-Use Products:
    • Settlement by hour: Huawei Cloud calculates the fee based on your usage every hour and deducts the fee from your account. For example, fees incurred from 8:00 to 9:00 are usually deducted before 10:00.
    • Settlement by month: Huawei Cloud calculates the fee based on your usage and deducts the fee of the month at the beginning of the next month. For example, fees incurred from 00:00:00 on April 1, 2019 to 23:59:59 on April 30, 2019 are usually deducted at about 01:00:00 on May 1, 2019.

From March to April, the total fee of the ClickHouse cluster is $1735.236 USD (3.636+17.31.60).