You can call this operation to query the latency between a primary RDS instance and its read-only instance.

When you call this operation, make sure that the following requirements are met:

  • The primary RDS instance runs the MySQL, PostgreSQL, or PPAS database engine.
  • The primary RDS instance has a read-only instance attached with it.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeReadDBInstanceDelay

The operation that you want to perform. Set the value to DescribeReadDBInstanceDelay.

DBInstanceId String Yes rm-bpxxxxxxx

The ID of the primary RDS instance.

ReadInstanceId String Yes rr-bpxxxxxxx

The ID of the read-only instance.

AccessKeyId String No LTAIfCxxxxxxx

The AccessKey ID provided to you by Alibaba Cloud.

Response parameters

Parameter Type Example Description
DBInstanceId String rm-bpxxxxxxx

The ID of the primary RDS instance.

DelayTime Integer 0

The latency between the primary RDS instance and its read-only instance.

Items

A list of latency items.

Items

A list of latency items.

DBInstanceId String rm-bpxxxxxxx

The ID of the primary RDS instance.

ReadDBInstanceNames "ReadDBInstanceName": ["rr-bp15gwi79771113p1"]

A list of information about the read-only instance.

Note This parameter is returned only when the primary RDS instance runs the MySQL database engine.
ReadDBInstanceName

A list of information about the read-only instance.

Note This parameter is returned only when the primary RDS instance runs the MySQL database engine.
ReadDelayTimes "ReadDelayTime": ["0"]

A list of latencies.

Note This parameter is returned only when the primary RDS instance runs the MySQL database engine.
ReadDelayTime

A list of latencies.

Note This parameter is returned only when the primary RDS instance runs the MySQL database engine.
ReadonlyInstanceDelay

A list of Write Ahead Log (WAL) latency information.

Note This parameter is returned only when the primary RDS instance runs the PostgreSQL or PPAS database engine.
ReadonlyInstanceDelay

A list of WAL latency information.

Note This parameter is returned only when the primary RDS instance runs the PostgreSQL or PPAS database engine.
FlushLag String 0

The duration of delay in the persistence of WAL log data. Unit: seconds.

FlushLatency String 0

The data size allowed for delay in the persistence of WAL log data. Unit: MB.

ReadDBInstanceName String rr-bpxxxxxxx

The ID of the read-only instance.

ReplayLag String 0

The duration of delay in the playback of WAL log data. Unit: seconds.

ReplayLatency String 0

The data size allowed for delay in the playback of WAL log data. Unit: MB.

SendLatency String 0

The data size allowed for delay in the sending of WAL log data. Unit: MB.

WriteLag String 0

The duration of delay in the write-back of WAL log data. Unit: seconds.

WriteLatency String 0

The data size allowed for delay in the write-back of WAL log data. Unit: MB.

ReadDBInstanceId String rr-bpxxxxxxx

The ID of the read-only instance.

RequestId String F1BDDEA8-452D-450B-AB10-CD5C5BAFC5DF

The ID of the request.

Examples

Sample requests


http(s)://rds.aliyuncs.com/? Action=DescribeReadDBInstanceDelay
&DBInstanceId=rm-bpxxxxxxx
&ReadInstanceId=rr-bpxxxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeReadDBInstanceDelayResponse>
  <Items>
        <Items>
              <ReadDelayTimes>
                    <ReadDelayTime>0</ReadDelayTime>
              </ReadDelayTimes>
              <ReadonlyInstanceDelay>
        </ReadonlyInstanceDelay>
              <DBInstanceId>rm-bpxxxxxxx</DBInstanceId>
              <ReadDBInstanceNames>
                    <ReadDBInstanceName>rr-bpxxxxxxx</ReadDBInstanceName>
              </ReadDBInstanceNames>
        </Items>
  </Items>
  <DelayTime>0</DelayTime>
  <DBInstanceId>rm-bpxxxxxxx</DBInstanceId>
  <RequestId>F1BDDEA8-452D-450B-AB10-CD5C5BAFC5DF</RequestId>
</DescribeReadDBInstanceDelayResponse>

JSON format

{
	"Items":{
		"Items":[
			{
				"ReadDelayTimes":{
					"ReadDelayTime":[
						"0"
					]
				},
				"ReadonlyInstanceDelay":{
					"ReadonlyInstanceDelay":[]
				},
				"DBInstanceId":"rm-bpxxxxxxx",
				"ReadDBInstanceNames":{
					"ReadDBInstanceName":[
						"rr-bpxxxxxxx"
					]
				}
			}
		]
	},
	"DelayTime":"0",
	"RequestId":"F1BDDEA8-452D-450B-AB10-CD5C5BAFC5DF",
	"DBInstanceId":"rm-bpxxxxxxx"
}

Error codes

For a list of error codes, visit the API Error Center.