To better manage OceanBase Database, you need to learn about its basic components, including OceanBase clusters, zones, OBServers, resource pools, tenants, and partitions.
OceanBase Database is a financial-grade distributed relational database independently developed by Ant Group and Alibaba Cloud. OceanBase Database is managed based on OceanBase clusters. An OceanBase cluster consists of multiple zones. Generally, an OceanBase cluster consists of three or more zones. Each zone contains multiple OceanBase servers on which the observer process runs. Generally, the number and configuration of servers are the same among zones. Multiple OceanBase servers constitute a resource pool for each business. Administrators can divide the resources into resource pools of different sizes and allocate them to tenants. Generally, we recommend that you allocate large resource pools to businesses with high performance requirements and small resource pools to businesses with low performance requirements.
Tenants can use resources in their resource pools to create databases, tables, and partitions.
The following figure shows the relationship among the basic components of OceanBase Database.
OceanBase clusters, zones, and OceanBase servers
A cluster consists of multiple zones. Each zone contains one and only one replica for each data record. In this way, when a zone is faulty, businesses can still run properly without data loss. Physically, different zones correspond to different cities, different IDCs in one city, or different racks in one IDC. This mechanism implements disaster recovery at different levels.
A cluster usually consists of three or more zones, and OceanBase Database uses the Paxos protocol. Therefore, the majority needs to reach a consensus. When one zone is faulty, replicas on the remaining two or more zones constitute the majority, protecting the business from being affected by the faulty zone. Independent computing engines and storage engines are provided for OceanBase servers. OceanBase servers contain some data. For businesses, each OceanBase server is a traditional centralized database. If a business requests OceanBase server A for data on OceanBase server B, OceanBase server A negotiates with OceanBase server B to schedule data, which is imperceptible to the business.
Resource pools and tenants
Multiple OceanBase servers in a cluster form a large resource pool. Administrators create virtual resource pools with different specifications including CPU, memory, storage, TPS, and QPS for tenants based on the tenant requirements. Resources allocated to each tenant are isolated to prevent resource competition among tenants. Memory resources are physically isolated, while CPU resources are logically isolated.
A system tenant stores system tables. System tenant IDs are less than or equal to 1000. Business tenant IDs are greater than 1000. When a tenant is created, you must specify the tenant mode to MySQL or Oracle.