Autoscaling in public cloud environments

You can scale up or down the resources allocated to your database automatically by ensuring that an autoscaling event is triggered if pre-defined acceptable latency policy is not met. This ensures predictable database performance.

An autoscaling event is triggered if the rolling average value of the combined metrics reaches a pre-defined threshold value.

Autoscaling does the following to ensure that you have predictable database performance when scaling up or down:

  • Gradual increase and decrease to the number of nodes (cluster does not shrink or expand drastically).

  • Sufficient cooldown period between scaling up or down to avoid frequent change in cluster size.

You can see the results of scale-up or scale-down on the Databases > Charts page. This page shows you graphs for concurrent clients and RPC latency that provides information about how COD is scaling up or down.

The scaling metric responds to the increase or decrease in the nodes, but there may be cases where increasing or decreasing the number of nodes does not have an effect because of the kind of workload that is running or if there are limited regions for a table.

The autoscaling framework got extended and besides the latency-based metrics, the database can scale based on HDFS disk utilization and bucket cache usage for Cloud with Ephemeral storage type of COD.

For more information, see Fast autoscaling in COD.

To check which autoscaling parameters are set for the COD cluster, you can use the describe-database CDP CLI command.

cdp opdb describe-database --environment-name [CDP ENVIRONMENT NAME] --database-name [DATABASE NAME]

To define the autoscaling, you can use the update-database CDP CLI command and define the required parameters in the autoScalingConfig option. Following is a sample command.

cdp opdb update-database --environment-name [CDP ENVIRONMENT NAME] --database-name [DATABASE NAME] --auto-scaling-parameters "minWorkersForDatabase=<min_worker_nodes>,maxWorkersForDatabase= <max_worker_nodes>”

The minimum and maximum nodes are limited with the minWorkersForDatabase and maxWorkersForDatabase autoscaling configurations.

For more information, see describe-database CDP CLI command.