The log transfer service of OceanBase Database automatically transfers REDO logs from the primary cluster to standby clusters.
This service provides the following major features:
Transmits REDO logs from the primary cluster to standby clusters.
Allows a standby cluster to automatically pull REDO logs from the primary cluster when the REDO log version of the standby cluster is earlier than that of the primary cluster.
Manages all synchronization parameters of standby clusters and supports cascaded log transfer.
OceanBase Database supports the following two transfer modes:
Synchronous mode (
SYNC)In this mode, the REDO logs of the primary cluster are synchronously transferred to the destination standby cluster. The persistent storage of a REDO log is considered successful only after the log is persistently stored in the primary cluster and the standby cluster in
SYNCmode. The transaction submission latency increases the network latency of the primary and standby clusters and the log persistence duration of the standby clusters.In maximum protection or maximum availability mode, you can set only one standby cluster to be in
SYNCmode for the primary cluster. In maximum performance mode, this transfer mode does not take effect, and you can set a custom number of standby clusters to be inSYNCmode.You can set the primary cluster to be in
SYNCmode. This setting takes effect only if the cluster becomes a standby cluster after a switchover. In maximum protection and maximum availability modes, the primary cluster must be set to be inSYNCmode before switchover. This way, at least one standby cluster is inSYNCmode after the switchover.Asynchronous mode (
ASYNC)In this mode, the REDO logs of the primary cluster are asynchronously transferred to the destination standby cluster. The transaction committing latency is not affected by the destination standby cluster.
A log transfer mode determines whether to synchronously transfer logs from the primary cluster to a standby cluster. OceanBase Database supports one primary cluster and multiple standby clusters, and the standby clusters can adopt different log transfer modes. The log transfer mode varies based on the protection mode. The following table describes all possible scenarios and whether the primary cluster synchronously transfers logs to the destination standby cluster.
Standby cluster in SYNC mode |
Standby cluster in ASYNC mode |
|
|---|---|---|
| Maximum protection mode | Logs are synchronously transferred. | Logs are asynchronously transferred. |
| Maximum performance mode | Logs are asynchronously transferred. | Logs are asynchronously transferred. |
| Maximum availability mode | Logs are synchronously or asynchronously transferred. | Logs are asynchronously transferred. |
In maximum protection mode, logs are synchronously transferred to the standby cluster in
SYNCmode, and asynchronously transferred to the standby clusters inASYNCmode.In maximum performance mode, logs are asynchronously transferred to the standby clusters, regardless of the log transfer mode that you configured.
In maximum availability mode, logs may be synchronously or asynchronously transferred to the standby cluster in
SYNCmode, and asynchronously transferred to the standby cluster inASYNCmode.