Since its birth, OceanBase database uses Paxos protocol to realize multi-copy data consistency at the bottom layer, which has the advantages of “RPO=0, low RTO (usually less than 30s), automatic switchover in case of failure”. After years of experience in practical application scenarios, especially in high-concurrency, high-traffic and 24-7 continuous transaction scenarios such as Alipay, Taobao and E-commerce Bank, OceanBase database has explored a set of complete high-availability and disaster recovery schemes tested by practice. In the following, we introduce some commonly used high availability and disaster recovery solutions for OceanBase and distributed data based on the practical experience of OceanBase database.

The core idea is to make full use of the principle of distributed multi-copy data consistency protocol, and combine the specific characteristics of various unexpected situations (individual hardware failure? Machine room disaster? Or city-level disaster?) And find a corresponding solution. If the customer’s infrastructure is limited and cannot meet the deployment requirements of the distributed multi-replica data consistency protocol, you can consider introducing other methods, such as inter-cluster data replication.

In the table below, we summarize several options for readers’ reference:

Generally speaking, the following solutions meet the requirements of “RPO=0, low RTO, and automatic failover in case of failure” and have no obvious technical defects. Therefore, they should be the first choice for high availability and DISASTER recovery (Dr) solutions:

• Single-node three-copy solution If you do not have any room-level OR city-level Dr Requirements, but only have the simplest requirements for high availability, this simple deployment solution is the best.

• Same-city three-room three-copy solution If the machine-room level Dr Requirements are met but city-level Dr Requirements are not met, this solution is the best choice. If the customer only has room 2 in the same city but does not build room 3, it can consider renting a room (or even only part of the cabinet) in the same city to meet the requirements of room 3. OceanBase’s “log copy” technology can be used to reduce the deployment difficulty.

• Three-place, three-room, five-copy Solution If both machine-room and city-level Dr Requirements are met, this solution provides the highest level of high availability.

If the customer’s infrastructure cannot meet the requirements of the preceding solutions but requires the machine-room or city-level Dr Capability, inter-cluster data replication is recommended.

Finally, IT is also important to realize that technology continues to evolve, OceanBase continues to evolve, and so does the IT construction of users. The best solution today may be a better alternative tomorrow, so we must continue to evolve our technology solution with an evolutionary perspective so that OceanBase users will have more and better choices in the future. In this process, we also hope to have more technical exchanges and ideological collisions with friends in the industry and users, and jointly promote the development of high availability and disaster recovery solutions under distributed database technology.