Use the Change Tracking feature to capture real-time incremental data from an ApsaraDB RDS for MySQL database for cache updates, asynchronous decoupling, and ETL synchronization.
Usage notes
- Online DDL changes by tools such as gh-ost or pt-online-schema-change are not tracked. The client may fail to write consumed data to the destination table due to schema mismatches.
- If the source database is used in another task such as data migration, data outside your subscription scope may be tracked. Filter unwanted data in your client application.
Procedure
- Purchase a change tracking instance. Purchase a change tracking task.
- Log on to the DTS console.
- In the left-side navigation pane, click Change Tracking.
- On the Change Tracking Tasks page, select the region of your change tracking instance.
- Find the change tracking instance and click Configure Task.
- Configure the source database information and network type.
- Click Set Whitelist and Next.
DTS adds its server CIDR blocks to the source database configuration. For Alibaba Cloud instances such as ApsaraDB RDS for MySQL or ApsaraDB for MongoDB, CIDR blocks are added to the instance whitelist. For self-managed databases on ECS, DTS adds CIDR blocks to security group rules, but you must also add them to the database whitelist. CIDR blocks of DTS servers.
Warning Adding public CIDR blocks poses security risks. Use strong passwords, restrict open ports, authenticate internal APIs, review network access regularly, and use private connections through Express Connect, VPN Gateway, or Smart Access Gateway. - In the Create Change Tracking Account dialog box, wait for the account to be created, and then click Next.
- Configure the data types and objects to track.
- Click Save and Precheck. Note
- The task can start only after it passes a precheck.
- If the precheck fails, click
- When the Precheck Passed message appears in the Precheck dialog box, close the Precheck dialog box.
After configuration, the change tracking instance initializes in about one minute. You can then create consumer groups and start consuming tracked data.