Database Autonomy Service (DAS) provides the auto scaling feature. During peak hours, DAS automatically scales up a database instance to handle traffic peaks and ensure business stability. DAS monitors the CPU utilization of the database instance in real time. If the CPU utilization per unit of time decreases, DAS automatically scales down the database instance. This topic describes how to enable the auto scaling feature.
- A PolarDB instance is connected to DAS.
- The pay-as-you-go billing method is used for the PolarDB instance.
- Enable Autonomy Service is turned on for the database instance. For more information, see Autonomy center.
A PolarDB instance is connected to DAS and the auto scaling feature is enabled. During peak hours, DAS automatically scales up the instance. This operation doubles the read/write throughput and lowers the CPU utilization from more than 90% to 25%. This allows the instance to run under heavy loads for nearly 10 consecutive hours. After the read and write traffic decreases and the CPU utilization drops to less than 25%, DAS automatically scales down the instance to the original specification.
This way, DAS effectively ensures the stability of online business.
- Log on to the DAS console.
- In the left-side navigation pane, click Instance Monitoring.
- On the Instance Monitoring page, find the instance for which you want to enable the auto scaling feature, and click the instance ID to go to the instance details page.
- In the left-side navigation pane, click Autonomy Center.
- On the Autonomy Center page, click Settings in the upper-right corner.
- In the Settings dialog box, turn on Automatic Scale-out and configure the following parameters.
Parameter Description Average CPU utilization The threshold to trigger automatic scale-up. If the average CPU utilization is greater than or equal to the specified value, automatic scale-up is triggered. Maximum Specifications The upper limit of the instance specification upgraded for auto scaling. DAS adjusts the specification of a database instance by one level at a time. For example, DAS changes the instance specification from 4 cores to 8 cores and then to 16 cores based on business requirements. This process continues till the instance specification reaches the specified upper limit. Maximum number of read-only nodes The maximum number of read-only nodes that can be automatically added for auto scaling. DAS adds only one read-only node at a time. This process continues till the number of nodes reaches the specified upper limit. Observation Window The time window during which DAS monitors the CPU utilization of the database instance. If the CPU utilization reaches the specified value for more than 50% of the duration of an observation window, DAS triggers automatic scale-up when the observation window ends. By default, if the CPU utilization is greater than 70% for more than 50% of the duration of an observation window, DAS triggers automatic scale-up when the observation window ends. Quiescent Period The minimum interval between two automatic scaling operations. During a quiescent period, DAS monitors the CPU utilization of the instance, but does not perform auto scaling. If a quiescent period and an observation window end at the same time and the CPU utilization of the monitored instance meets the condition in the observation window, DAS automatically scales up the specification of the instance when the quiescent period and the observation window end.
- Turn on Automatic Scale-in based on your business requirements.Note After you turn on Automatic Scale-in, DAS automatically scales down the instance upon the end of an observation window if the CPU utilization reaches the threshold in the observation window. By default, a scale-down operation is triggered if the CPU utilization is lower than 30% for more than 99% of the duration of an observation window. DAS scales down the instance by one level at a time till the instance is scaled down to the original specification.
- Click OK.