OceanBase Database provides multiple deployment solutions. You can choose a solution based on IDC specifications and your business requirements for performance and availability.
| Deployment solution | Disaster recovery type | RTO | RPO |
|---|---|---|---|
| Three replicas in the same IDC | Lossless disaster recovery at the OBServer or rack level | Within 30s | 0 |
| Primary/standby cluster architecture for two IDCs in the same city | Disaster recovery at the IDC level | Within minutes | Greater than 0 |
| Three IDCs in the same city | Lossless disaster recovery at the IDC level | Within 30s | 0 |
| Primary/standby cluster architecture for two IDCs across two regions | Disaster recovery at the region level | Within minutes | Greater than 0 |
| Five replicas in three IDCs across three regions | Lossless disaster recovery at the region level | Within 30s | 0 |
If you require disaster recovery at different levels, OceanBase Database provides the following high availability (HA) solutions: multi-replica deployment and primary/standby cluster architecture. The multi-replica deployment is implemented based on the Paxos protocol. If the minority of replicas are unavailable, services can be automatically recovered without data loss. The multi-replica deployment provides a recovery time objective (RTO) within 30s and a recovery point objective (RPO) of 0. The primary/standby cluster architecture is implemented based on the traditional primary/standby architecture and serves as an important supplement to the multi-replica deployment. The primary/standby cluster architecture can meet the disaster recovery requirements in double-IDC and double-region scenarios but cannot avoid data loss. The primary/standby cluster architecture delivers an RPO greater than 0 and an RTO within minutes.
Three replicas in the same IDC
If you use only one IDC, you can deploy three or more replicas to achieve lossless disaster recovery at the OBServer level. If an OBServer or the minority of OBServers are down, services remain unaffected without data loss. If the IDC contains multiple racks, you can deploy a zone for each rack to achieve lossless disaster recovery at the rack level.
Primary/standby cluster architecture for two IDCs in the same city
If you use two IDCs in the same city and IDC-level disaster recovery is required, you can use the primary/standby cluster architecture and deploy a cluster in each IDC. If one of the IDCs is unavailable, another IDC can take over the services. If the standby IDC is unavailable, service data is not affected, and services are not interrupted. If the primary IDC is unavailable, you must activate the cluster in the standby IDC as the new primary cluster to take over services. The standby cluster cannot ensure that all data is synchronized, and data may be lost.
Three IDCs in the same city
If you use three IDCs in the same city, you can deploy a zone for each IDC to achieve lossless disaster recovery at the IDC level. If one of the IDCs is unavailable, the other two IDCs can continue to provide services without data loss. This deployment solution does not depend on the primary/standby cluster architecture. However, it does not support region-level disaster recovery.
Primary/standby cluster architecture for two IDCs across two regions
If you require region-level disaster recovery and you use only one IDC in each region, you can use the primary/standby cluster architecture. You can specify one region as the primary region where the primary cluster is deployed and specify another region where the standby cluster is deployed. If the standby cluster is unavailable, services in the primary region are unaffected. If the primary cluster is unavailable, the standby cluster can be activated as the new primary cluster to continue to provide services. In this case, data may be lost.
You can also use the active-active mode based on the two IDCs across two regions by deploying two sets of primary/standby clusters in the two regions. This allows you to manage resources in an efficient manner and achieve higher disaster recovery performance.
Five replicas in three IDCs across three regions
Based on the principle of the Paxos protocol, you need to deploy your cluster in at least three regions to achieve lossless geo-disaster recovery. OceanBase Database adopts a variant of the "three IDCs across two regions" solution, which involves five replicas in three IDCs across three regions. This updated solution includes three cities with one IDC each. The IDC in the first two cities has two replicas each, whereas the third IDC has only one replica. Compared with the "three IDCs across two regions" solution, this solution requires each transaction to be synchronized to at least two cities. Business applications must be tolerant of the latency introduced by cross-region replication.
Five replicas in five IDCs across three regions
This solution is similar to the "five replicas in three IDCs across three regions" solution, with the exception that each IDC is deployed with one replica to improve disaster recovery at the IDC level.