Obtaining the Status of Data Synchronization Between Two DR Instances
Function
This API is used to obtain the status of data synchronization between two DR instances (primary and standby instances), primary instance ID, data synchronization metrics, and RPO and RTO values in switchover and failover scenarios.
Constraints
This API supports GeminiDB Redis instances.
URI
GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/disaster-recovery/data-synchronization
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a user in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
master_instance_id |
String |
Primary instance ID. |
slave_instance_id |
String |
Standby instance ID. |
status |
String |
Status of data synchronization between two DR instances. Value options:
|
data_sync_indicators |
object |
Data synchronization metric. A value is returned only when the requested instance ID is the primary instance ID. For details, see Table 4. |
rto_and_rpo_indicators |
Array of objects |
RPO and RTO values in failover or switch over scenarios. A value is returned only when the requested instance ID is the primary instance ID. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
rsync_ops |
Long |
Rate that rsync transfers data on each node. |
rsync_wal_size |
Long |
Size (in MB) of WAL files to be synchronized on each node. |
rsync_push_cost |
Long |
Average time (in us) required for rsync to push data from the time when a synchronization message is put into the message queue to the time when a response is received. |
rsync_send_cost |
Long |
Average time (in us) required for rsync to send data from the time when a synchronization message is taken out of the message queue to the time when a response is received. |
rsync_max_push_cost |
Long |
Maximum time (in us) required for rsync to push data in a collection period. |
rsync_max_send_cost |
Long |
Maximum time (in us) required for rsync to send data in a collection period. |
rsync_status |
Integer |
Synchronization status of rsync. The value 1 indicates that rsync is synchronizing data. The value 0 indicates that rsync is not synchronizing data. |
Parameter |
Type |
Description |
---|---|---|
scene |
String |
Scenario. The value can be FAILOVER or SWITCHOVER. FAILOVER indicates that roles of DR instances are forcibly switched even though data synchronization has not completed. SWITCHOVER indicates that the roles are switched after data synchronization completes. Value options:
|
rpo |
Long |
Maximum acceptable amount of data loss (measured by time, in seconds) during a switchover or switchover. |
rto |
Long |
Maximum acceptable amount of time (in seconds) for restoring a database and regaining access to it. |
Example Requests
Example Responses
Status code: 200
Success
The requested instance ID is the primary instance ID: { "master_instance_id": "b0965c9010f44ffca9af4ee00746aa8din12", "slave_instance_id": "c0965c9010f44ffca9af4ee00746aa8din12", "status": "SYNCING", "data_sync_indicators": { "rsync_ops": 100, "rsync_wal_size": 30, "rsync_push_cost": 30, "rsync_send_cost": 20, "rsync_max_push_cost": 35, "rsync_max_send_cost": 25, "rsync_status": 1 }, "rto_and_rpo_indicators": [ { "scene": "SWITCHOVER", "rpo": 20, "rto": 40 }, { "scene": "FAILOVER", "rpo": 20, "rto": 40 } ] }
The requested instance ID is the standby instance ID: { "master_instance_id": "c0965c9010f44ffca9af4ee00746aa8din12", "slave_instance_id": "b0965c9010f44ffca9af4ee00746aa8din12", "status": "SYNCING" }
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot