This topic describes how to set a replication delay for an RDS for MySQL read-only instance. The read-only instance replicates data from the corresponding master instance at the specified delay.

Background information

For more information about the related API, see ModifyDBInstanceDelayReplicationTime.

After you set a replication delay for a read-only instance, the read/write splitting function does not take effect on the read-only instance. To make the read/write splitting function take effect on the read-only instance, you must change the replication delay of the read-only instance to 0 seconds.

读写分离无效

Procedure

  1. Log on to the RDS consoleRDS console.
  2. Select the target region.选择地域
  3. Find the target RDS instance and click the instance ID.
    找到目标实例
  4. In the left-side navigation pane, click Service Availability.
  5. Click Set Delayed Replication.
    设置延时复制
  6. In the displayed dialog box, set Delay and click OK.
    Note The delay is measured in the unit of second. The default delay is 0 seconds, indicating that the master instance sends operation log data to the read-only instance immediately after completing an operation and the read-only instance performs the operation immediately after receiving the operation log data.