Configuring an Auto Scaling Policy for a DB Instance
Scenarios
You can configure auto scaling policies for your pay-per-use and yearly/monthly DB instances on the Basic Information page. When configuring auto scaling policies, you can enable or disable Auto Scale-up or Auto Scale-down. The scaling types include changing instance specifications and the number of read replicas.
Required Permissions
- If you configure an auto scaling policy using a Huawei Cloud account, no additional configuration is required. If you configure an auto scaling policy as an IAM user for the first time, you need to obtain the permission to create an agency.
- To configure an auto scaling policy, you must have the following IAM permissions.
Table 1 IAM permissions and agencies IAM Policy
Permission
Agency
Role/Policy-based
- iam:agencies:listAgencies
- iam:agencies:createAgency
- iam:permissions:listRolesForAgencyOnProject
- iam:permissions:grantRoleToGroupOnProject
- iam:permissions:grantRoleToAgencyOnProject
- iam:roles:listRoles
- iam:roles:createRole
If you do not have these permissions, create a custom policy.
The system will automatically create the RDSAccessProjectResource agency. This agency is visible to you. Deleting the agency will result in auto scaling failures.
Identity policy-based
- iam:agencies:listAgencies
- iam:agencies:createServiceLinkedAgencyV5
If you do not have these permissions, create a custom identity policy.
The system will automatically create the ServiceLinkedAgencyForGaussDBforMySQL agency. This agency is visible to you but cannot be deleted.
Constraints
- This function is only available for pay-per-use and yearly/monthly DB instances.
- The read replicas that are automatically added or deleted will be billed on a pay-per-use basis.
- Changing DB instance specifications will briefly interrupt services.
- If you want to set Scaling Type to Number of read replicas, there must be only one proxy instance. For details, see Creating a Proxy Instance for Read/Write Splitting.
- The system will delete or add read replicas. To prevent your services from being affected, you are advised not to use a private IP address for read to connect to your applications.
- The pricing standard for auto scaling is the same as that for manual scaling. For details, see Billing.
Billing
- Pay-per-use instances
The instance specifications and number of read replicas can be automatically changed.
Pricing is listed on a per-hour basis, but bills are calculated down to the second. The old order automatically becomes invalid.
To view the cost incurred by auto scaling, access the Billing Center page and then choose Billing > Dashboard in the navigation pane.
- Yearly/Monthly instances
The instance specifications and number of read replicas can be automatically changed.
You will be billed for the new specifications. For details, see TaurusDB Pricing Details.
If the new specifications are less than the specifications that you purchased, the refund is automatically returned to your account. You can access the Billing Center page and then choose Orders > My Orders in the navigation pane to view the details.
Table 2 Pricing description for yearly/monthly instances Billing Item
Description
Specifications after scale-up
You need to pay the following fee:
Price of new specifications x Remaining duration x Number of nodes – Price of original specifications x Remaining duration x Number of nodes
Note: Remaining duration = Number of remaining days in a calendar month/Total number of days in the calendar month
Example:
A customer placed and paid a monthly order for a TaurusDB instance on April 1, 2023. The instance contains 2 nodes and its specifications are 2 vCPUs and 8 GB of memory. The total subscription period would be 30 days and the instance would expire on April 30, 2023. On April 18, 2023, the instance specifications automatically scaled up to 4 vCPUs and 16 GB of memory. The remaining duration is 0.4 (12/30).
The monthly price of the new specifications is $290 USD and that of the old specifications is $145 USD, so you need to pay for $116 USD (290 x 0.4 x 2 – 145 x 0.4 x 2).
Specifications after scale-down
For pricing details, see Unsubscriptions.
Added read replicas
New read replicas are billed on a pay-per-use basis. You only pay for what you use.
Deleted read replicas
Deleted read replicas are no longer billed.
Configuring an Auto Scaling Policy
- Log in to the TaurusDB console.
- Click
in the upper left corner and select a region and project. - On the Instances page, click the instance name to go to the Basic Information page.
- In the Configuration area, click Configure under Auto Scaling.
Figure 1 Configuring an auto scaling policy
- In the displayed dialog box, set required parameters.
Figure 2 Setting auto scaling parameters
Table 3 Parameter description Parameter
Description
Auto Scale-up
You can enable or disable it as needed.
Scaling Type
You can select one or more scaling types.
- Instance specifications
- Number of read replicas
- Read replicas that are automatically added to or deleted from a yearly/monthly DB instance will be billed on a pay-per-use basis.
- After Auto Scale-up is enabled, read replicas that are automatically added cannot be promoted to primary.
- If you deselect Number of read replicas, pay-per-use nodes created in the current instance will be automatically deleted. Exercise caution when performing this operation.
CAUTION:The account balance must be sufficient, or scaling up the specifications or adding read replicas may fail.
Observation Period
- When auto scale-up is enabled, the system periodically checks the CPU usage. If the average CPU usage exceeds the preset limit within the observation period, it upgrades the specifications or adds read replicas based on the read and write traffic. The system enters a silent period after each scale-up.
- The minimum observation period is 5 minutes.
Average CPU Usage
Threshold for triggering an auto scale-up.
If the average CPU usage of the primary node exceeds the specified value, the system automatically upgrades the specifications. If your DB instance has a proxy instance and the average CPU usage of read replicas exceeds the specified value, the system automatically adds read replicas.
Allowed range: 50%–100%
Max. Specifications
Maximum specifications after the final auto scale-up. The specifications can only be scaled up gradually and the system enters the silent period after each scale-up.
Max. Read Replicas
You can only add one read replica at a time. A maximum of 15 read replicas are supported.
Replica Read Weight
If you have enabled read/write splitting, the new read replicas are automatically associated with the proxy instance.
Auto Scale-down
You can enable or disable it as needed.
Once auto scale-down is enabled, if the system observes the average CPU usage drops below 30% for more than 99% of the observation period, it gradually restores the original configuration. The system enters a silent period after each scale-down.
Silent Period
The silent period is the minimum interval between two changes (triggered automatically or manually), where no more changes can happen.
- Click OK.
- Refresh the Basic Information page later and check that Auto Scaling is enabled.
Viewing Change History
- Log in to the TaurusDB console.
- Click
in the upper left corner and select a region and project. - On the Instances page, click the instance name to go to the Basic Information page.
- In the Configuration area, click View Change History under Auto Scaling.
- In the displayed dialog box, view the change time, change type, status, original specifications, and new specifications.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot