Data Transmission Service (DTS) allows you to synchronize or migrate data from a PolarDB-X 1.0 instance to the destination database. However, if you directly use a PolarDB-X 1.0 instance as the source instance of a DTS task and more than two ApsaraDB RDS for MySQL instances are attached to the DRDS instance, performance bottlenecks and stability risks may occur. Your business may be affected. To achieve higher performance and stability, we recommend that you configure a task for each ApsaraDB RDS for MySQL instance that is attached to the PolarDB-X 1.0 instance.
Prerequisites
You have read the Limits for using PolarDB-X as the source instance and have made sure to follow the relevant conventions and precautions.Solutions
Solution | Configuration method | Description |
---|---|---|
Solution 1 | Configure a DTS task for each ApsaraDB RDS for MySQL instance that is attached to the PolarDB-X 1.0 instance. When you configure DTS tasks, you must map the database and table names of all the ApsaraDB RDS for MySQL instances to the database and table names of the destination instance. Compared with directly using the PolarDB-X 1.0 instance as the source instance of a DTS task, this solution ensures higher performance and stability. Important If you use this solution, you can select only tables as the objects to synchronize or migrate. | We recommend that you use Solution 1, which provides higher performance and stability than Solution 2. In addition, the number of ApsaraDB RDS for MySQL instances attached to the PolarDB-X 1.0 instance is unlimited. |
Solution 2 | Directly use the PolarDB-X 1.0 instance as the source instance to configure a data synchronization or migration task. If more than two ApsaraDB RDS for MySQL instances are attached to the DRDS instance, the stability and operability of the DTS task may be affected. Your business may also be affected. | If you use Solution 2 and more than two ApsaraDB RDS for MySQL instances are attached to the source PolarDB-X 1.0 instance, the performance and stability of the DTS task may be compromised. |
Comparison between Solution 1 and Solution 2
Item | Solution 1 | Solution 2 |
---|---|---|
Performance | Multiple DTS tasks provide higher performance and support large amounts of data writes to the PolarDB-X 1.0 instance. | Only one DTS task is configured to migrate or synchronize data from the PolarDB-X 1.0 instance. When the business system writes large amounts of data to the source instance, performance bottlenecks occur. |
Stability | High. Multiple DTS tasks are configured to migrate or synchronize data from the ApsaraDB RDS for MySQL instances attached to the Setting PolarDB-X 1.0 instance. If one of the DTS tasks fails, the other DTS tasks are not affected. You only need to recover the failed DTS task. | Medium. Only one DTS task is configured to migrate or synchronize data from the PolarDB-X 1.0 instance. If the DTS task fails, you must troubleshoot the entire task to resume data transmission. |
Ease of use | You must configure multiple DTS tasks. You must configure database and table name mapping for each task. You must map the database and table names of multiple ApsaraDB RDS for MySQL instances in the source instance to the names of the databases and tables in the destination instance. | You need to configure only one DTS task for the source PolarDB-X 1.0 instance. |
Resource usage | Multiple DTS instances are required. | Only one DTS instance is required. |
How do the two solutions implement synchronization or incremental migration of DDL operations
DTS does not support synchronization or incremental migration of DDL operations from a PolarDB-X 1.0 instance. If DDL operations are performed in the source PolarDB-X 1.0 instance during data synchronization or migration, you can perform the following steps to ensure that data can be written to the destination database:
- Release the DTS task.
- Clear the destination database.
- Reconfigure the task.
In some scenarios where PolarDB-X 1.0 is the source instance, you can synchronize or migrate DDL operations without releasing the DTS task. The following table describes specific scenarios and corresponding operations.
Scenarios | Operation |
---|---|
You use Solution 1 and select tables as the objects to synchronize. |
|
You use Solution 2 and select an entire database as the object to be migrated or synchronized. |
|
You use Solution 2 and do not select an entire database as the object to be migrated or synchronized. |
|