Enabling fast autoscaling in COD

Learn how to enable the fast autoscaling mechanism in COD.

  • The cluster must have the COD setup in the environment.
  • The node on which the steps are executed must have the CDP CLI installed.
  • You must have the COD_USE_COMPUTE_ONLY_NODES entitlement.
  • You must use COD 1.37.0 or a higher version.
  1. Launch the CDP CLI tool.
  2. Use the CDP CLI create-database command to create the compute instance group.
    Use the --auto-scaling-parameters option to specify the maximum and minimum number of compute nodes.
    cdp opdb create-database —environment-name <env_name> –database-name <db_name> --auto-scaling-parameters '{"minComputeNodesForDatabase":<min_compute_nodes>, "maxComputeNodesForDatabase": <max_compute_nodes>}'
    Where,
    • <max_compute_nodes> specifies the maximum number of Compute nodes required in the system.
    • <min_compute_nodes> specifies the minimum number of Compute nodes in the system.

    When the command is successfully executed, the newly created database contains the instantiated <max_compute_nodes> nodes. However, in the subsequent, scaling-executor cycle, the Compute nodes are stopped until the required number of nodes or the count <min_compute_nodes> is reached.

    Alternatively, if the database is already created on 1.37.0, we can use the update database CDP CLI command to update the autoscaling parameters mentioned above.

  3. Configure the autoscaling parameter to have an appropriate maxCpuUtilization which represents the average CPU utilization percent across Worker nodes and Compute nodes.
    cdp opdb update-database --environment-name <env_name> --database-name <db_name> \
    --auto-scaling-parameters '{"maxCpuUtilization": 80. . . }'

    The subsequent scaling cycles start or stop the Compute nodes as per the compute requirements.

  4. Execute the update-database CDP CLI command to start all the Compute nodes in the system, if the cluster needs to be stopped or upgraded.
    cdp opdb update-database --environment-name <env_name> --database-name <db_name> \
    --auto-scaling-parameters  '{"minComputeNodesForDatabase":<max_compute_nodes>}'

    All the Compute nodes are started. The nodes are running after the cluster upgrade or restart.

  5. Revert to the original <min_compute_node> after the restart or upgrade.
    cdp opdb update-database --environment-name <env_name> --database-name <db_name> \
    --auto-scaling-parameters  '{"minComputeNodesForDatabase":<min_compute_nodes>}'

    The subsequent scaling cycles stop the additional Compute nodes in the cluster.