Autoscaling
Note
Autoscaling is only available for the OLTP mode.
In dedicated mode in Managed Service for YDB, you can use autoscaling of computing resources.
Autoscaling adjusts the number of database nodes to accommodate load variations, allowing you to handle increased load and optimize your costs during low load periods. Yandex Managed Service for YDB does this via CPU utilization, i.e., CPU core utilization percentage across all computing pools
To use autoscaling, you should select the target CPU utilization value averaged out across the database nodes, plus the minimum and maximum number of nodes. Yandex Managed Service for YDB will try to maintain CPU utilization at this level by adjusting the number of database nodes within these limits. Newly added nodes have identical configurations and are evenly distributed across availability zones.
Note
For reliable and stable performance, a database should have more than one node and maintain CPU utilization below 60%.
Example
Your database is deployed with six compute nodes, and you need to maintain CPU utilization at 50% under the fluctuating load. This allows the system to handle traffic spikes without allocating too many resources. To achieve this, autoscaling is configured the following way: target CPU utilization of 50%, with minimum number of nodes being three and maximum number, nine. With this configuration, the system will automatically scale up the number of compute nodes when CPU utilization exceeds 50% to handle higher loads. Conversely, when CPU utilization drops below 50%, the number of nodes will be scale down to optimize costs during periods of lower loads. At all times, the total number of nodes will remain between three and nine.