OceanBase Database, based on a distributed architecture, provides flexible online scalability. It supports online scaling while ensuring the continuous availability of the cluster.
OceanBase Database typically consists of multiple zones, with each zone containing several physical servers. The overall structure of OceanBase Database is shown in the following figure.

Compared with traditional standalone databases, OceanBase Database, based on a distributed architecture, provides flexible online scalability. It supports online scaling while ensuring the continuous availability of the cluster. When the disaster recovery requirements of a cluster change, you can increase or decrease the disaster recovery capability of the cluster by adjusting the number of zones. When the external load on a cluster changes, you can adjust the load capacity of the cluster by modifying the number of physical servers in a zone (adding or removing OBServer nodes). The following sections describe the scaling capabilities of OceanBase Database in detail from two aspects.
Dynamic adjustment of zones
Each data copy in an OceanBase cluster maintains multiple replicas. Multiple replicas of a data copy form a basic high-availability unit through the Paxos protocol. Normally, the system deploys at most one data replica in each zone. If a failure occurs in a few zones, the remaining replicas in the zones can still continue to provide services via the Paxos protocol while ensuring data integrity. You can increase the number of data replicas and thus enhance system availability by adding zones. The following example illustrates this.
Consider an OceanBase cluster that contains three zones: Zone1, Zone2, and Zone3. Each data copy in the cluster has three replicas, deployed in these three zones respectively. To further improve system availability, you want to upgrade the number of data replicas to five. You can achieve this goal by scaling out zones. First, add two new zones to the cluster: Zone4 and Zone5. Then, add physical servers in the new zones (Zone4 and Zone5). Subsequently, you can deploy new data replicas in Zone4 and Zone5 as needed to complete the dynamic zone-level scaling-out.
Conversely, you can also reduce the number of zones to perform dynamic zone-level scaling-in.
Dynamic adjustment of physical servers
To support linear expansion of database service capabilities, OceanBase Database supports dynamic adjustment of physical servers within a zone, that is, adjusting the number of physical servers in a zone to expand service capabilities. The following example illustrates how OceanBase Database achieves linear expansion of service capabilities.
Consider an OceanBase cluster that originally had 3N OBServer nodes (including three zones: Zone1, Zone2, and Zone3, with N OBServer nodes in each zone) providing read and write services. When the service capability of the cluster cannot fully meet the read and write requests, you need to scale out the OceanBase cluster to enhance its service capability. Add three new OBServer nodes to the cluster, one node for each zone. After the scaling-out, each zone contains N+1 OBServer nodes. Through dynamic scaling-out, the number of OBServer nodes in the cluster increases accordingly. The Root Service will then, based on the internal load balancing mechanism, evenly distribute the original data and workload of the cluster to the newly added nodes.
Conversely, when the service capability of the nodes in the cluster has significant redundancy for the current load, you can consider reducing the number of nodes to lower cluster costs.
