The data synchronization feature supports multiple types of synchronization topologies. You can plan your data synchronization instances based on your business requirements. This topic describes the synchronization topologies that are supported by Data Transmission Service (DTS) and how to use these topologies.
One-way synchronization
To ensure data consistency for one-way synchronization, we recommend that you perform only read operations on the objects in the destination instance. Do not perform write operations on the objects.
Topology type | Topology | Description |
One-way one-to-one synchronization | None | |
One-way one-to-many synchronization | You must purchase multiple data synchronization instances to implement one-way one-to-many synchronization. For example, if you want to synchronize data from Instance A to Instance B, Instance C, and Instance D, you must purchase three data synchronization instances. | |
One-way cascade synchronization | You must purchase multiple data synchronization instances to implement one-way cascade synchronization. For example, if you want to synchronize data from Instance A to Instance B and then from Instance B to Instance C, you must purchase two data synchronization instances. | |
One-way many-to-one synchronization | You must purchase multiple data synchronization instances to implement one-way many-to-one synchronization. For example, if you want to synchronize data from Instance B, Instance C, and Instance D to Instance A, you must purchase three data synchronization instances. Note In specific scenarios, such as multi-table merging, if you perform change operations on multiple data records of different objects in the source instance and you want to synchronize the data records to the same data row in the destination instance, DTS concurrently performs the change operations on the destination instance. This may cause data inconsistency. |
Two-way synchronization
Source instance | Destination instance |
MySQL |
|
PolarDB for MySQL |
|
PostgreSQL |
|
PolarDB for PostgreSQL |
Note You need to purchase a data synchronization instance before you configure two-way synchronization between a PolarDB for PostgreSQL cluster and a PostgreSQL database or a PolarDB for PostgreSQL cluster. For more information about how to purchase a DTS instance, see Purchase a DTS instance. |
Tair or Redis | Tair or Redis |
MongoDB | MongoDB |
DTS supports only two-way synchronization between two databases. DTS does not support two-way synchronization between multiple databases.
For more information about how to configure two-way synchronization, see Configure two-way synchronization between MySQL databases.
You can upgrade the synchronization topology of a data synchronization task from one-way to two-way. For more information, see Upgrade synchronization topology from one-way to two-way.
Topology type | Topology | Description |
Two-way one-to-one synchronization | To ensure data consistency, make sure that data records with the same primary key, business primary key, or unique key are updated on only one of the source and destination instances. Note If data records are updated on both the source and destination instances, DTS responds to conflicts based on the conflict resolution policy that you specify for the data synchronization task. |