Help Center> Data Replication Service> User Guide> Real-Time Synchronization> Synchronization from DDM to RDS MySQL DB

Synchronization from DDM to RDS MySQL DB

This section uses DDM to RDS MySQL synchronization as an example to describe how to configure a synchronization task.

Prerequisites

  • You have logged in to the DRS console.
  • Your account balance is greater than or equal to ¥0.
  • For details about real-time synchronization, see Real-Time Synchronization.
  • For details about constraints on DRS usage, see Before You Start.

Procedure

  1. On the Data Synchronization Management page, click Create Synchronization Task.
  2. On the Create Synchronization Instance page, configure the task details, recipients, description, and the synchronization instance, and click Next.

    Figure 1 Synchronization task information
    Table 1 Task and recipient description

    Parameter

    Description

    Task Name

    The task name consists of 4 to 50 characters, starts with a letter, and can contain only letters (case-insensitive), digits, hyphens (-), and underscores (_).

    Send Notifications

    This parameter is optional. If this function is enabled, DRS will send notifications to specified recipients based on the mobile numbers and email addresses you provided. If an exception occurs during synchronization, the system will send a notification to the specified recipients.

    NOTE:

    Recipients must confirm the subscription on the SMN console within 48 hours of receiving an SMS message or email. Otherwise, they cannot receive notifications from DRS.

    Synchronization Delay Threshold

    During an incremental synchronization, a synchronization delay indicates a time difference (in seconds) of synchronization between the source and destination database.

    If the synchronization delay exceeds the threshold you specify, DRS will send alarms to the specified recipients. The value ranges from 1 to 3,600. To avoid repeated alarms caused by the fluctuation of delay, an alarm is sent only after the delay has exceeded the threshold for six minutes.

    NOTE:
    • In the early stages of an incremental synchronization, the synchronization delay is long because a large quantity of data is awaiting synchronization. In this case, no notifications will be sent.
    • Before setting the delay threshold, you need to enter the recipient's mobile number or email address.

    Description

    The description consists of a maximum of 256 characters and cannot contain the following special characters: !=<>'&"

    Figure 2 Synchronization instance information
    Table 2 Synchronization instance information

    Parameter

    Description

    Data Flow

    Select To the cloud.

    Source DB Engine

    Select DDM.

    Destination DB Engine

    Select MySQL.

    Network Type

    The public network is used as an example. Currently, DRS supports public networks and VPCs.

    Destination DB Instance

    Select an RDS DB instance you have created.

    Synchronization Instance Subnet

    Select the subnet where the synchronization instance is located. You can also click View Subnet to go to the network console to view the subnet where the instance resides.

    By default, the DRS instance and the destination DB instance are in the same subnet. You need to select the subnet where the DRS instance resides, and there are available IP addresses for the subnet. To ensure that the synchronization instance is successfully created, only subnets with DHCP enabled are displayed.

    Synchronization Mode

    Full+Incremental

    This synchronization mode allows you to synchronize data in real time. After a full synchronization initializes the destination database, an incremental synchronization parses logs to ensure data consistency between the source and destination databases.

    NOTE:

    If you select the Full+Incremental synchronization mode, data generated during the full synchronization will be synchronized to the destination database in real time, ensuring that both the source and destination databases remain accessible.

    Source DB Instance Quantity

    The default minimum number of source DB instances is 2 and the maximum number is 16. You can set this parameter based on the number of source database shards.

  3. On the Configure Source and Destination Databases page, wait until the synchronization instance is created. Then, specify source and destination database information and click Test Connection for both the source and destination databases to check whether they have been connected to the synchronization instance. After the connection tests are successful, select the check box before the agreement and click Next.

    Figure 3 Source database information
    Table 3 Source database information

    Parameter

    Description

    Middleware IP Address or Domain Name

    The IP address or domain name of the source database.

    Port

    The port of the source database. Range: 1 - 65535

    Middleware Username

    The username for accessing the source database.

    Middleware Password

    The password for the database username.

    SSL Connection

    SSL helps you encrypt the connections between the source and destination databases. If SSL is enabled, you need to upload the SSL CA root certificate.

    NOTE:
    • The maximum size of a single certificate file that can be uploaded is 500 KB.
    • If the SSL certificate is not used, your data may be at risk.

    DB Instance

    The sharded database details.

    The IP address, domain name, username, and password of the source database are encrypted and stored in DRS and will be cleared after the task is deleted.

    Figure 4 Destination database information
    Table 4 Destination database information

    Parameter

    Description

    DB Instance Name

    By default, this parameter is set to the RDS DB instance you have selected when you create the migration task and cannot be changed.

    Database Username

    The username for accessing the destination database.

    Database Password

    The database username and password are encrypted and stored in the system and will be cleared after the task is deleted.

  4. On the Set Synchronization Task page, select the data synchronization type, conflict policy, and synchronization object, and then click Next.

    Figure 5 Synchronization mode
    Table 5 Synchronization mode and object

    Parameter

    Description

    Synchronization Object

    DRS supports table-level synchronization. You can select data for synchronization based on your service requirements.

  5. On the Check Task page, check the synchronization task.

    • If any check fails, review the failure cause and rectify the fault. After the fault is rectified, click Check Again.

      For details about how to handle check failures, see the Checking Whether the Source Database Is Connected section in the Data Replication Service User Guide.

    • If all check items are successful, click Next.
      Figure 6 Task check

      You can proceed to the next step only when all check items are successful. If any alarms are generated, view and confirm the alarm details first before proceeding to the next step.

  6. On the Confirm Task page, specify Start Time, confirm that the configured information is correct, select the check box before the agreement, and click Next.

    • Set Start Time to Start upon task creation or Start at a specified time based on site requirements.
    • After a synchronization task is started, the performance of the source and destination databases may be affected. You are advised to start a synchronization task during off-peak hours.

  7. After the task is submitted, you can view and manage it on the Data Synchronization Management page.

    • You can view the status of the task that has been submitted. For details about the task status, see Task Status.
    • You can click in the upper-right corner to view the latest task status.