How does OceanBase Database achieve high availability?
Conventional databases use solutions such as primary/standby database or one-primary-multiple-standby database solutions. However, OceanBase Database uses servers with high cost performance and relatively low reliability. OceanBase Database stores the same data on more than half of servers among multiple (>= 3) servers. For example, it stores the same data on 2 of 3 servers, or 3 of 5 servers. Each write transaction only takes effect after more than half of the servers receive the transaction. Therefore, OceanBase Database prevents data loss when a few servers fail. When the primary database fails, conventional databases usually need to promote the secondary database to the primary database by using external tools or manually. However, OceanBase Database adopts the Paxos protocol at the underlying layer. When the primary database fails, the remaining databases automatically elect a new primary database (the leader) and continue to provide services. During multiple network disconnection drills in IDCs of Ant Group, OceanBase Database automatically fails over without losing data, which proves the technical superiority of the high-availability architecture of OceanBase Database.