Updated on 2023-07-03 GMT+08:00

Real-Time Synchronization

Real-time synchronization refers to the real-time flow of key service data from sources to destinations while consistency of data can be ensured. It is different from migration. Migration means moving your overall database from one platform to another. Synchronization refers to the continuous flow of data between different services.

Only whitelisted users can use this function. To use this function, submit a service ticket. In the upper right corner of the management console, choose Service Tickets > Create Service Ticket.

Supported Database Types

For details about supported database types and versions and synchronization types, see Supported Databases.

Network Types

DRS supports real-time synchronization through a Virtual Private Cloud (VPC), Virtual Private Network (VPN), Direct Connect, or public network. Table 1 lists the application scenarios of each network type and required preparations, and Table 2 lists the supported network types of each synchronization scenario.

Table 1 Network types

Network Type

Application Scenario

Preparations

VPC

Synchronization between cloud databases in the same region

  • The source and destination databases must be in the same region.
  • The source and destination databases can be in either the same VPC or in different VPCs.
  • If source and destination databases are in the same VPC, they can communicate with each other by default. Therefore, you do not need to configure a security group.
  • If the source and destination databases are not in the same VPC, the CIDR blocks of the source and destination databases cannot be duplicated or overlapped, and the source and destination databases are connected through a VPC peering connection. DRS automatically establishes a route through a single IP address when you test the network connectivity.
  • DRS does not support communication between the source database and destination database over a VPC across tenants. If necessary, you can create a VPC peering connection and select VPN for Network Type to enable communication between the source and destination databases.

    For details about how to create a VPC peering connection, see Virtual Private Cloud User Guide.

VPN

Synchronization from on-premises databases to cloud databases or between cloud databases across regions

Establish a VPN connection between your local data center and the VPC that hosts the destination database. Before synchronization, ensure that the VPN network is accessible.

For more information about VPN, see Getting Started with Virtual Private Network.

Direct Connect

Synchronization from on-premises databases to cloud databases or between cloud databases across regions

Use a dedicated network connection to connect your data center to VPCs.

For more information about Direct Connect, see Getting Started with Direct Connect.

Public network

Synchronization from on-premises or external cloud databases to the destination databases.

To ensure network connectivity between the source and destination databases, perform the following operations:

  1. Enable public accessibility.

    Enable public accessibility for the source database based on your service requirements.

  2. Configure security group rules.
    • Add the EIPs of the synchronization instance to the whitelist of the source database for inbound traffic.
    • If destination databases and the synchronization instance are in the same VPC, they can communicate with each other by default. Therefore, you do not need to configure a security group.
    NOTE:
    • The IP address on the Configure Source and Destination Databases page is the EIP of the synchronization instance.
    • If SSL is not enabled, synchronizing confidential data is not recommended.
Table 2 Supported network types

Synchronization Direction

Source DB

Destination DB

VPC

Public Network

VPN or Direct Connect

To the cloud

MySQL

MySQL

Supported

Supported

Supported

PostgreSQL

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

GaussDB(for MySQL)

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

PostgreSQL

PostgreSQL

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

DDM

MySQL

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

DDM

Supported

Supported

Supported

Oracle

MySQL

Supported

Supported

Supported

DDM

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

PostgreSQL

Supported

Supported

Supported

GaussDB(for MySQL)

Supported

Supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

DB2 for LUW

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

GaussDB distributed instances

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

TiDB

GaussDB(for MySQL)

NOTE:

Only whitelisted users can use this function.

Not supported

Supported

Supported

Microsoft SQL Server

GaussDB(DWS)

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

GaussDB distributed instances

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

Microsoft SQL Server

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Supported

MongoDB

DDS

Supported

Supported

Supported

From the cloud

MySQL

MySQL

Supported

Supported

Supported

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Supported

Supported

Oracle

Supported

Supported

Supported

DDM

MySQL

Supported

Supported

Supported

Oracle

Supported

Supported

Supported

Kafka

Supported

Supported

Supported

DDS

MongoDB

Supported

Supported

Supported

PostgreSQL

Kafka

Not supported

Supported

Supported

GaussDB primary/standby

MySQL

NOTE:

Only whitelisted users can use this function.

Not supported

Supported

Supported

Oracle

Not supported

Supported

Supported

Kafka

Supported

Supported

Supported

GaussDB(DWS)

Not supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB distributed

MySQL

Not supported

Supported

Supported

Oracle

Not supported

Supported

Supported

GaussDB(DWS)

Not supported

Supported

Supported

Kafka

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB(for MySQL)

MySQL

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Supported

Supported

Oracle

Supported

Supported

Supported

Self-built -> Self-built

MySQL

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Supported

Supported

Oracle

Kafka

Supported

Supported

Supported

GaussDB primary/standby instances

Not supported

Supported

Supported

GaussDB distributed instances

Not supported

Supported

Supported

PostgreSQL

Kafka

Not supported

Supported

Supported

GaussDB primary/standby instances

Oracle

Not supported

Supported

Supported

Kafka

Supported

Supported

Supported

GaussDB distributed instances

Oracle

Not supported

Supported

Supported

Kafka

Supported

Supported

Supported

Supported Synchronization Objects

DRS allows you to synchronize different objects. The following table lists the supported objects.

Table 3 Supported synchronization objects

Synchronization Direction

Source DB

Destination DB

Table-level

Database-level

Importing an Object File

To the cloud

MySQL

MySQL

Supported

Supported

Supported

PostgreSQL

Supported

Supported

Supported

GaussDB distributed

Supported

Not supported

Not supported

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Supported

GaussDB(for MySQL)

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

PostgreSQL

PostgreSQL

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Not supported

GaussDB primary/standby instances

Supported

Not supported

Not supported

GaussDB distributed

Supported

Not supported

Not supported

DDM

MySQL

Supported

Not supported

Not supported

GaussDB(DWS)

Supported

Supported

Not supported

DDM

Supported

Supported

Not supported

Oracle

MySQL

Supported

Supported

Supported

DDM

Supported

Not supported

Not supported

GaussDB(DWS)

Supported

Not supported

Supported

PostgreSQL

Supported

Not supported

Supported

GaussDB(for MySQL)

Supported

Supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

DB2 for LUW

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Supported

GaussDB distributed instances

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Supported

GaussDB(DWS)

Supported

Not supported

Supported

TiDB

GaussDB(for MySQL)

NOTE:

Only whitelisted users can use this function.

Supported

Supported

Not supported

Microsoft SQL Server

GaussDB(DWS)

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Not supported

GaussDB primary/standby instances

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Not supported

GaussDB distributed instances

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Not supported

Microsoft SQL Server

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Not supported

MongoDB

DDS

Supported

Supported

Not supported

From the cloud

MySQL

MySQL

Supported

Supported

Not supported

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Not supported

Supported

Oracle

Supported

Not supported

Supported

DDM

MySQL

Supported

Not supported

Not supported

Oracle

Supported

Supported

Not supported

Kafka

Supported

Supported

Not supported

DDS

MongoDB

Supported

Supported

Not supported

PostgreSQL

Kafka

Supported

Supported

Not supported

GaussDB primary/standby

MySQL

NOTE:

Only whitelisted users can use this function.

Supported

Not supported

Not supported

Oracle

Supported

Not supported

Supported

Kafka

Supported

Not supported

Not supported

GaussDB(DWS)

Supported

Not supported

Not supported

GaussDB distributed

Supported

Not supported

Supported

GaussDB primary/standby

Supported

Not supported

Supported

GaussDB distributed

MySQL

Supported

Not supported

Not supported

Oracle

Supported

Not supported

Supported

GaussDB(DWS)

Supported

Not supported

Not supported

Kafka

Supported

Not supported

Not supported

GaussDB distributed

Supported

Not supported

Supported

GaussDB primary/standby

Supported

Not supported

Supported

GaussDB(for MySQL)

MySQL

Supported

Supported

Supported

GaussDB(DWS)

Supported

Supported

Supported

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Supported

Not supported

Oracle

Supported

Not supported

Supported

Self-built -> Self-built

MySQL

Kafka

Supported

Supported

Supported

CSS/ES

Supported

Not supported

Supported

Oracle

Kafka

Supported

Not supported

Supported

GaussDB primary/standby

Supported

Supported

Supported

GaussDB distributed

Supported

Supported

Supported

GaussDB primary/standby instances

Oracle

Supported

Not supported

Supported

Kafka

Supported

Not supported

Not supported

GaussDB distributed instances

Oracle

Supported

Not supported

Supported

Kafka

Supported

Not supported

Not supported

PostgreSQL

Kafka

Supported

Supported

Not supported

Advanced Features

DRS supports multiple features to ensure successful data synchronization.

Table 4 Advanced features

Feature

Description

Synchronization level

DRS supports database- and table-level synchronization.

  • Database-level synchronization refers to a type of synchronization method using database as a unit. You do not need to select tables to be synchronized. New tables in the database are automatically added to the synchronization task.
  • Table-level synchronization uses table as a unit, indicating that you need to add new tables to the synchronization task manually.

Mapping object names

Allows the names of synchronization objects (including databases, schemas, tables, and columns) in the source database to be different from those in the destination database. If the synchronization objects in source and destination databases have different names, you can map the source object name to the destination one.

The following objects can be mapped: databases, schemas and tables.

Dynamically adding or deleting synchronization objects

During data synchronization, you can add or delete synchronization objects as required.

Conflict policy

DRS uses primary key or unique key conflict policies to ensure that tables with primary key or unique constraints in the source database can be synchronized to the destination database as expected.

The following conflict policies are supported:

  • Ignore

    The system will skip the conflicting data and continue the subsequent synchronization process.

  • Overwrite

    Conflicting data will be overwritten.

  • Report error

    The synchronization task will be stopped and fail.

Ignore and overwrite: Synchronization stability is prioritized, so tasks will not be interrupted as data conflicts occur.

Report error: Data quality is prioritized. Any data conflicts are not allowed, so once a conflict occurs, the synchronization task fails and an error is reported. You need to manually find the cause of the fault. If the task is in the failed state for a long time, the storage space may be used up and the task cannot be restored.

Structure synchronization

DRS does not provide data structure synchronization as an independent function during real-time synchronization. Instead, it directly synchronizes data and structures to the destination database.