The database system provides support for data storage and querying in the application architecture. It is crucial for data security and business continuity of enterprises. High availability is the primary consideration in the architecture design of the database system. High availability includes high availability of services and high reliability of data. This topic describes the technologies for ensuring high availability of services in OceanBase Database. For more information about the technologies for ensuring high reliability of data, see "Backup and restoration."
OceanBase Database provides a variety of technologies for ensuring high availability of services, including intra-cluster multi-replica disaster recovery, arbitration-based disaster recovery, and inter-cluster Physical Standby Database disaster recovery.
Multi-replica disaster recovery
OceanBase Database supports multi-replica disaster recovery based on the Paxos protocol. This solution provides high availability with a recovery point objective (RPO) of 0 and a recovery time objective (RTO) of less than 8s when a minority of replicas fail.
Multi-replica disaster recovery is applicable to single-cluster deployment mode. Transaction logs are persisted, and logs are synchronized between multiple replicas. The Paxos protocol guarantees log persistence for the majority of replicas, and disaster recovery is achieved by changing members.
Multi-replica disaster recovery ensures fast fault recovery with zero data loss when a minority of OBServer nodes in a cluster fail. However, if you cannot use the deployment mode of five IDCs across three regions, but want to ensure cross-region geo-disaster recovery and high availability in more challenging scenarios, such as failures of a majority of OBServer nodes or software bugs, you can use the Physical Standby Database solution.
Arbitration-based disaster recovery
Arbitration-based disaster recovery is an innovative high availability solution provided by OceanBase Database on the basis of Paxos-based multi-replica disaster recovery.
At the business layer, this solution ensures strong synchronization of data on the majority of replicas (when four full-featured replicas and one arbitration service are deployed) or all replicas (when two full-featured replicas and one arbitration service are deployed). If half of the full-featured replicas fail, this solution automatically downgrades the failure to avoid data loss while ensuring business continuity.
Unlike the maximum protection or maximum availability solution for a conventional database, this solution achieves a balance between business continuity and data integrity, thus avoiding the risk of split-brain. In addition, based on your locality settings, OceanBase Database can provide read and write services on multiple OBServer nodes where full-featured replicas are deployed.
Similar to majority-based disaster recovery, arbitration-based disaster recovery is an intra-cluster solution that cannot ensure data protection or availability when a majority of replicas or all replicas fail.
Physical Standby Database
The Physical Standby Database solution is an important part of the high availability capability of OceanBase Database.
This solution is applicable to multi-cluster deployment mode. Transaction logs are transmitted between multiple clusters to provide log-based physical hot backup services. In OceanBase Database V4.2.0, the Physical Standby Database solution adopts an independent primary/standby architecture. Primary and standby tenants can be created. Only logs are transmitted between primary and standby tenants by using a direct network connection or a transmission channel established by using a third-party log service. Unlike the centralized architecture in earlier versions, clusters in the independent primary/standby architecture are separated from each other. You can manage the clusters more flexibly.
Logs are asynchronously transferred from the primary tenant to standby tenants, and only the Maximum Performance mode is supported. Therefore, if you want to ensure strong data consistency during disaster recovery, use the multi-replica or arbitration-based disaster recovery solution.