Rebalancing Shards Across All DB Instances
Overview
With rebalancing, database shards are rebalanced between original and new DB instances.
Prerequisites
- There are schemas available in a running DDM instance.
- You have purchased a MySQL DB instance. The DB instance and your DDM instance are in the same VPC, and the DB instance is not in use by other DDM instances.
Procedure
- In the instance list, locate the instance that contains schemas you require and click the instance name.
- On the displayed page, in the navigation pane, choose Schemas.
- In the schema list, locate the schema that you want to scale out and click Scale Out the Operation column.
Figure 1 Scale Out
- On the displayed page, select Rebalance for Scaling Method, configure Traffic Switch and Automatic Clearance Required, select the required DB instances, enter the administrator password, and click Test Connection. After the connection is successful, click Next: Confirm Information.
Figure 2 Rebalance
Figure 3 How rebalancing works
- Click Next: Pre-check. After all check items are complete, click Scale out.
If the schema status changes to Running, the scaling out succeeds and the newly-added MySQL DB instance is displayed in the Associated DB Instance column.
If the DDM instance version is earlier than 2.4.1.3, do not set sql_mode to ANSI_QUOTES. If you do so, do not use double quotation marks to quote text strings because the quotation marks will be translated into an identifier that makes the quoted string invalid.
For example, logic in select * from test where tb = "logic" cannot be parsed correctly.
- If Status changes to Scaling failed, the schema failed to be scaled out. Click Retry or Roll back.
- Scale out a schema during off-peak hours.
- Storage scaling does not support tables without primary keys.
- Only schemas whose status is Running can be scaled out.
- Only one schema can be scaled out in a DDM instance at a time.
- A maximum of 256 MySQL DB instances can be selected for scaling.
- You can view the scaling progress on the Schemas page. The whole scaling process takes about 5 to 30 minutes depending on the amount of data to be migrated.
- During scaling, DDM automatically enables the LOAD DATA function. After scaling, you can disable the function in parameter template settings of the MySQL DB instance as needed.
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